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 - "objects"
-
So this guy passed large objects as function arguments directly instead of referencing. What a jackass. So the program was slow as fuck AND taking up too much memory.
So yeah, I'm basically ranting about myself.2 -
This dev world is still so damn fucking sexist, it's driving me nuts.
"it's so cool seing a GIRL doing this stuff"
"wow you're so tech savy for a GIRL"
"you're too CUTE to be a developer"
"how does it feel to be a GIRL in dev"
Just treat us like fucking human beings for once instead of pretty, empty objects.88 -
*happily tapping along on my projects while commuting*
Some random kid appears, overly interested in what I'm writing, so I let him look.
Then he goes *snort* do you know why Java threw c out?
No.
*giggles* because c told Java to stop treating women like and objects.
Well, treating them like primitives is no good either.
*kid walks away*
Then I hear: mom. That man ruined my joke, he said treating women like primitives is no good.6 -
She: "I am not getting anything out of these classes!!"
Me: "Try making some Objects first"
*Awkward silence*8 -
Java and C were telling jokes. It was C's turn, so he writes something on the wall, points to it and says "Do you get the reference?" But Java didn't.
C gets all the chicks and Java doesn't? Because C doesn't treat them like objects.
But I think C could at least give Java some pointers8 -
wife: why don't you react to things I say (she means why don't I go crazy when she says crazy shit)
me in my head: after 7 years in IT I have learned not to react when people above you say crazy shit.2 -
Classes are classist.
Objects are objectifying.
Race conditions are racist.
Foreign keys are xenophobic.
Functions are ableist.
Thin clients are weightist.
Bitmasks perpetuate heteronormativity.
Code beautifiers promote unrealistic beauty expectations.
Test-driven development is victim blaming.
Forced commit pushes are rape.
Motherboards perpetuate gender roles.
And don't get me started on white space.8 -
So, when counting physical objects, my 4 year old daughter keeps starting at "zero." 🤓
It's the weirdest thing, and I've even tried to discourage it. But, hey, she uses it correctly...so, I'll just roll with it.3 -
I just spent an hour debugging as to why a fucking json_decode STILL PRODUCED OBJECTS.
.
.
.
.
.
Oh right, I need to set a second parameter as true.
😐12 -
Laravel is the worst framework ever.
Everything has to be made convenient and easy. That sounds amazing, because developers want to save time, worry less about boilerplate code, right? No more constructors, no more dependency injection, fuck all the tedious OOP shit... RIGHT?
It does one thing well: Make PHP syntax uniform and concise through easily integrated libraries such as Collection and Carbon. But those are actually not really part of the framework... just commonly integrated and associated with Laravel.
The framework itself is completely derailed: You can define code in a callback in the routes file. You can define a controller in the routes file. You can define middleware as a parameter to the route, as a fluent method to the route, you can stack them up in a service provider. Validators can be made in controllers, Request objects, service providers, etc. You can send mail inline, through Mailable objects, through Notification objects, etc.
Everything is macroable, injectable, and definable in a million different places. Ultimate freedom!
Guess what happens when you give 50 developers of various seniority a swiss army knife?
One hammers in a screw with a nail file, the other clips the head from the screw using scissors, and you end up with an unworkable mess and blunt tools.
And don't get me started about Eloquent, the Active Record ORM. It's cute for the simple blog/article/author/comment queries, but starts choking when you want more selective and performant queries or more complex aggregates, and provides such an opaque apple-esque interface which lets people think everything is OK, when in reality it's forcing the SQL server to slowly commit suicide.50 -
Java: Ok, any ideas on how to make women more interested in us ?
.
.
.
C++: Make more exceptions ?
Python: Redefine our methods ?
C: Stop treating them like objects ?
.
.
.
*Java furious at C*
.
.
.
*Java throws C out of the building*11 -
If I had a dev superpower it would be the ability to generate 3D printed objects at will so I could have more cool shit on my desktop.11
-
When you create a bunch of objects in Java and it crashes because you're used to the memory usage of C's structs.3
-
I hate it when people say they want to "GET a new girlfriend"...
Shouldn't it be "FIND a new girlfriend"?
I mean you can't just go into the supermarket and get some butter, milk and a new girlfriend. You can't buy them. By saying that, you seem to me as if you're treating women as objects. I know it's technically possible to buy a girlfriend, but that's prostitution.
I think that "GET a new girlfriend" just doesn't sound right...
Your opinions?38 -
When writing a JavaScript guide, please don't use emojis as keys in objects. Or anywhere else in code. Zoomers will think it's common practice.
Just because you can, doesn't mean you should.
Sincerely,
everyone26 -
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 -
"Imagine everyone is an object. You are an object, you are an object, you are an object." My lecturer said while pointing to random students in the class. Oh how I wanted to quip "So you think girls are just objects?" 😂13
-
"Why does the search take so long?" maybe because it searches through2 dbs with 20 tables with 5.000.000 objects on an 6 year old server with hdds and apparently there is no budget for a new server, but there is money for an 40.000€ art piece.2
-
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 -
Google - I was going to type 'escaping # in json objects' but I am genuinely interested in what wisdom this Internet doohickie thang has on escaping polygamy...8
-
I think we were one of the tens of companies to actually pay for one of Apple's most obscure products.8
-
i had this weird dream. i invented a programming language that was connected to the physical world. every time an object was instantiated during runtime, a 3D printer would print this object immediately in real time, into the void of a confined space without gravitation (like a physical stack, but not like a stack). if this object was passed objects as function parameters of its methods, these little objects were printed as well and temporarily moved into the orbit of this object, orbiting it like electrons or little moons.21
-
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 -
IT'S ALMOST 2021 AND I STILL HAVE TO FUCK WITH WSCRIPT OBJECTS FOR AN INTERNET EXPLORER WEB APP WHY? 😡rant eol technologies legacy shit fuck fucking internet explorer piece of shit software fuck this company9
-
Me : "hey front end dev, here is an API returing a list of objects, put them in a table"
*Some hours later
Front end : 'Done !"
Me :" Where are the totals?"
front end : 'Api doesn't give me totals"
me : "Calculate them. Just do a sum"
front end : 'I don't know how".
Yeah, "front end" apprently means only html css.... FML23 -
Just spent hours, debugging why a system is creating two objects in the database when trying to create one.
Turns out it is Chrome re-sending a POST request.
Really.
What. The. Actual. Fuck. Google.10 -
!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 -
"I don't see women as objects, each woman is in a class of their own! HAHAHAHAHAHAHAHA"
- People who have no fucking clue how OOP works
Objects are instantiations of classes, you poor, retarded bastards. You saw those two words while skimming your 1st year college textbook, made this joke, promptly changed to some useless English degree because you cried after your "hello world" program didn't run, and never looked back to see the damage you had done.
I know the joke is the word play but word play word play puns are retarded anyways. Everything about this pun is awful.8 -
Applies for Android Internship
Supervisor: Work with this Image Processing Library to "RECOGNIZE" objects from the phones camera.
Me: Wuuuuuh....?
Supervisor: Also it should be in real time and can't use internet.
Me: But that's impossible....
Supervisor: Align your goals with the company's goal. Nothing is impossible......(gets all motivational)
Me: 😩🔫15 -
Less rant, more mildly interesting Java trivia.
Integer i0 = 3; Integer i1 = 3;
Integer i2 = 300; Integer i3 = 300;
i0 == i1 is true as expected
i2 == i3 is actually false
Java caches -128 to 127 Integer objects for faster perf so when you're inside that range, the objects are indeed the same, but because == checks object equality, the Integer outside of the range is not cached and had to be initialized, so i2 and i3 are two different objects.
You can totally break some tests this way :)9 -
Today is going to be a long ass day :(
best way to start a saturday..
Receiving objects: 13% (866/6600), 740.01 KiB | 5.00 KiB/s
sometimes i think writing something new would be quicker then downloading it.2 -
Positive internship update :)
I have asked the store department chief if I can stop working with heavy objects.
He said "of course".
I will just do light tasks. I am fine with that :)4 -
Huh. ES6's variable destructuting on objects is actually pretty cool.
var {foo, bar, baz} = obj
Is functionally equivalent to this:
var foo = obj.foo
var bar = obj.bar
var baz = obj.baz
I like it! Makes things simpler.3 -
Been programming Java for a few weeks now, and WTF is this, Java?!
"Example".equals("Example")
What is wrong with the form that a dozen of other languages use?
"Example" == "Example"
P. S. If you don't know Java, the latter one compares for the type of objects and always returns true in this case.15 -
Update on my old rant: I started writing type definitions for our project (it's basically a chunk of separate files where you document the objects you use; typed languages have this out of the box, js doesn't and it may become useful depending on the size of the project). Our codebase is reasonably big -not complicated, but big- and I felt like I was losing track of all the properties\objects\usage\comments\whatever. So I iiterally wrote some ts interfaces: properties with name and types, that's it, so you know what you're passing around.
Proposal was denied, I'll have to delete the documentation; "keeping the doc updated is going to require more work".
Me: Ok, but what am I supposed to do when I need to interface with your code? Run the debugger and figure out what the fuck you guys are passing around?
Team leader: Yes 😊6 -
> Make a small game.
> Do it in Rust because why not.
> Decide "Hey, why not make the game objects have Lua scripts for their logic because Lua is easier to do quick and dirty code in than Rust?"
> 5 hours later delete all the code related to running the Lua in Rust because AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1 -
Wow i must have been brain dead when i wrote this code. Needed to exclude certain elements from response for the the list of objects.
for (obj : objects) {
If (obj.skipFromResponse()) {
break
}
add obj to response
}
I used break instead of continue at the if condition which meant it would break out of the loop at the first instance of condition being met.
This went through qa and has been in production for 4 weeks so how did this not break before. Well little did i know the list of objects was sorted and all the test data, qa data and everything so far in production coincidentally only had the last element with matching condition. This meant it returned everything correctly so far.
Today was the first time there was a situation where this caused incorrect output. Luckily as soon as I heard the description of the issue I remembered to check the merged PR and hung my head in shame for making such trivial error. I must have written way more complicated code without any problem but this made me embarrassed to even admit. 🤦♂️4 -
-- Once upon a time in a long forgotten country, a most wise wizard created a magic software that would replace all TODO comments in PHP files with actual code...
-- But dad, that's the wrong story. You wanted to tell the story of the WTF witch who makes all JS objects falsy.
Me -- Hm, okay mister, you got me. Let's see.
Me again -- Once upon a time in the far-off country of Whatthefuckia...
Man I'm so proud of my son.1 -
The whole idea of development is ego boosting. The idea of turning thought into action by building something is very intoxicating. The power to create something from nothing. To be able to construct a world where everything in that world follows my rules of existence. Whether those objects be a database, or an NPC in a game. Development is literally the power of a god!
Some people say I have a god complex. Yes, of course I do, I am a software developer...6 -
Alright, I've had it. I was scrolling through Walmart when I saw a kititchen utensil holder with a BLUETOOTH SPEAKER? Who needs this? It probably doesn't even sound that good. I am getting tired of people slapping a Bluetooth speaker in random objects. Someone gave me a Bluetooth flower pot for Christmas. Why do you need a bunch of low quality speakers in random objects? I don't get it.13
-
The worst thing of being a dev is that you can never enjoy things at face value anymore. If only I could play games without counting in my head how many objects are ticking too often .etc :(1
-
I feel the whole universe is a programmed game and someone is playing us. Like when we're playing GTA.
Few of us are the main characters and the rest of us are just random objects to populate the earth, we don't have any rule in the story. :(
Birth is the Constructor()
Death is the Finalizer()4 -
after 20 years of programming i finally understand objects, classes and methods. what a waste i am!9
-
1. Understand APIs without reading documentation.
2. Write correct code from first try.
3. Know to program in every language.
4. Create the perfect fully functional AI system.
5. Center objects vertically with one line CSS at target object.3 -
Trying to get the name of all objects in an array i made , thank god there is nothing wrong here...3
-
MFW I have to deal with an array that has various objects of many types and it's not easily debuggable because the backend is multithreaded.6
-
Why is it that women find C to be more attractive than Java?
Because C doesn’t treat them like objects. -
Life is about wrangling, biologists wrangle snakes, porn stars wrangle cocks, I wrangle giant JSON objects.2
-
Man! I love refactoring! 👨🏻💻😍
Only saved about 20 lines but it went from ugly string manipulation to beautiful JavaScript objects!6 -
The most recent that comes to my mind is from one of my previous projects. Our team is already overloaded and frustrated working for this garbage client. One fine day, out of the blue, the client once again revises the list of go-live critical development objects.
Our project manager takes this issue up with the client, and then with our management when the client does not listen.
The response he gets from our management is along the lines of, "But it's just forty development objects. Why are you complaining? Just get it done."
Needless to say, the motivation levels of the entire team went on a downward spiral soon after.1 -
On a scale of 1-10, how lazy are you when it comes to prototype code?
Me, well I'm a 'fuck it lets just wildcard anything that is a child of a GLib objects'
Don't be like me kids...
EDIT: Yes i know it should have been an override void4 -
Only around 700 lines of code and I finally have my first working Vulkan drawcall! Can't wait to integrate it into my engine for all the parallel rendering goodness (not to mention better architecture and asynchronous-ness)
One thing that's a bit weird about Vulkan is the way everything is very static and tightly linked together. You basically need a different renderpass for each stage of rendering (scene-hdr-no-aa, scene-hdr-msaa4, scene-hdr-smaa1, scence-shadow, post-bloom, post-resolve, etc.), a different pipeline object for each distinct pipeline configuration (!!) and both framebuffers and pipeline objects are only valid within the single renderpass they've been created for (roughly speaking)
Oh, and each time the window is resized you have to recreate *all* of these objects from scratch because they also depend on viewport size
No wonder `pipelineCache` is the first argument of `vkCreateGraphicsPipelines` lol3 -
UE4 to UE5 migration is not going smoothly. Particularly, UE5 likes to break physics. So now I have to deal with jittery objects that sometimes shoot themselves across the room.
... The reasonable explanation is that the env is haunted. 👀👻16 -
I was trying to make this app a good "SOLID" app. Then I realized if I did that I was going to have 57 objects that were just different enough that I couldn't generalize them and this app just isn't important enough for me to do that. So I took a nap.
-
Dependency Injection Frameworks are absolute shit. I have yet to encounter one that doesn't make code take hours to understand or debug, and usually requires a debugger to even begin to unravel it. Not to mention the "context" god objects that just are glorified versions of passing an array from function to function. You guys aren't avoiding global state you're just making it a clusterfuck. Stop being stupid for 2 minutes software development "progress" challenge. Level: impossible.19
-
Yep, this is definitely a node_modules folder. There‘re no other objects in the universe containing that much files.3
-
After years of my own dodgy javascript codes, I've started to throw away everything I know about javascript and learn it from scratch.
Learning that functions are objects really helped in restructuring a pile of my code. Eg passing it as a parameter to be executed.
Suddenly callback functions make a lot of sense now, and I've got a new found respect for the language. -
So for anyone else who uses Gamemaker studio 2... For the love of all that is holy get excited for the updates coming to GML!
Finally it looks like it's becoming more and more off a legitimate language with the addition of lightweight objects and inline methods...
Maybe people will start taking GML seriously and Gamemaker won't be considered a 'basic' engine anymore :-D
All can be found here: https://yoyogames.com/blog/514/...5 -
What I can figure out:
You give me a large application with multiple projects/classes/files/functions that is tens of thousands of lines long, I can debug it. I can picture the multi-dimensional data structures, objects that contain lists of other objects, all in my I head.
What I can't figure out:
Should I or should I not look at the person sitting at their desk when I walk back to my desk from the bathroom.4 -
!rant
Update & Thoughts of AngelHack10 Abu Dhabi.
The judges were so non technical they were impressed by an app demo (not ours) that could recognize objects printed in black and white on an A4 paper. The app claimed to read the 3d shape of a device and calculate the running cost based on its power consumption.
I think hackathons must have two pitches one technical and one business. Else every one with hardcoded demos can fool the judges easily.1 -
@AlexDeLarge and any other React guys, which do you prefer? Traditional css files, whether that be vanilla or with a preprocessor, or style objects for each component.
There are some pretty clear pros i can identify for both sides, but I'm pretty sure I'm missing somethings and I'd like to hear from you guys your opinions and experiences with either27 -
1. Coding gets me naturally high. Mentally sound and sharpens my focus.
2. Beating a challenge by code is fun. And watching something I spent much time on working is great. Like setting up all those dominos to watch them cascade and fall down one after another...bliss!
3. People think I'm smart because I can type instructions into inanimate objects and make lights flash on the screen.3 -
As a web designer/developer I hate this recent trend of very light gray text fields on forms that have a white background. I don't want to have to peer at my screen for objects. My vision is average, so why would a client want this?5
-
Can I just say fuck Xcode? How the fuck have I been working on an app for over 3 hours and only now when I do the first compile do you feel like showing me an "Internal Error" message which has caused all of the buttons, labels, text and just objects in general to disappear4
-
Core library was giving serious blow out of execution speed as data file size increased.
Traced it back to a GetHashCode implementation that was giving too many collisions for unequal objects, so when used as the key in a hash table it was causing the lookup to fall back to checking Equals (much slower).
Improved the GetHashCode implementation, and also precalculated it on construction (they were immutable objects), and run time went to warp speed! Was very happy with that.
Obviously put in a thread sleep to help manage expectations with the boss/clients going forwards. Can’t give those sort of gains away in one go. Sets a dangerous precedent.1 -
Today at work I accidentally redeployed our ELK instance without taking a backup of all of Kibana's saved objects...
I didn't realize Elastic stores all indexes including the Kibana's in it's app folder by default.
Tomorrow will be fun.... I can't decide what to do first... Recreating all the charts and tables from memory... Or fixing the deployment script to change the data dir path...2 -
I would like to know if anyone has created a CSV file which has 10,000,000 objects ?
1) The data is received via an API call.
2) The maximum data received is 1000 objects at once. So it needs to be in some loop to retrieve and insert the data.11 -
My deepest regret is believing lies about OOP, during my education.
1. It is the best way to model a software, easier to think about objects and relationships: no it is not.
2. It increases reusability: I have seen people invwnting base classes to justify.
Are there any lies you regret believing that you believed during your education?12 -
We spent a lot of time creating these CSS animated pop-ups that described parts of the product. They looked great, but the client called and said they were "flickering" on her computer. We debugged and could not for the life of us figure out what she meant by flicker. The code was so simple that we couldn't imagine how it could be flickering. It was just a jQuery fadeIn(). It worked fine for us in every browser we tried. So we just gave up. The next day, the client called back and said,"Hey, it looks great. You fixed the flickering. How did you do it?" And our dev replied, "Uh, we set the flicker to 0".6
-
Spent the afternoon listening to a colleague rant about Python's json.dumps not producing valid JSON, churning out single quotes. Turns out he was trying to encode a STRING that contained data that looked like JSON, instead of a dictionary of objects - which he swore it in fact was.2
-
The way I was told to write unit tests was particularly terrible.
No mocking of objects or dependencies so the tests ran the actual code in full including updating databases and files. Then at the end of each test there was code to restore all changes back to before the test.
Each test ended up being over 100 lines. Madness.1 -
Can someone explain the node_modules joke to me please? I've seen it quite a bit now, but I still don't get it. (Attached an example from https://devrant.com/rants/760537/...). Thanks in advance.5
-
Hello and welcome, to a presentation in which I will tell you my thoughts on the shortcomings of modern day computers and programming practices.
Computers are based on a very fundamental and old idea, folders, and files, a file is basically a concrete amount of data, whereas a folder is a group of files, and it comes from the real life concept of files and folders, now it might be quite obvious already that using a concept invented in 1898 by a guy called Edwin G. Seibels, might not be the best way for computers to function in the year 2020, but alas, it is.
Unless of course, you step into the world of a programmer.
A programmer’s world is much different, they use this idea of a data structure, or in simpler terms, an object. An Object is just like what you would think of as an object in your head, something with different properties that you can think about in different ways, for example your mobile phone, it has a battery percentage, it has a screen size, it has free space available. Programmers use these data structures to analyse data very quickly, like finding all phones with a screen size bigger than a certain size for example.
The problem is that programmers still use files and folders to create the programs that use these objects.
Consider this example.
Let’s say you want to create a virtual version of a drink bottle, consider what properties it will have, colour, volume, height, width, depth, material, etc..
As a programmer, you can leverage programming features and change the properties of a drink bottle directly, if you wanted to change the colour, you just say, drink bottle “dot” colour, equals blue, or red.
But if the drink bottle was represented as a file, all the drink bottles data would be inside the one file, so you would have to open the whole file, find the line or section of the file that has the colour data of the drink bottle, and select it, highlight it, delete what’s there, and type in your new value.
One way to explain this better is to imagine a folder that now represents the drink bottle, imagine adding a new file into that folder that represents each property I described before, colour, volume, etc.., well now, you could just open that folder, find the file for colour, either by looking with your eyes or you could do a file search in the folder for a file called colour, open it, and edit the value inside. This way of editing objects is the one that more closely represents the way programmers and a program itself interacts with objects inside a running programming language.
But the thing is, programmers don’t use the folder/file way of creating objects and putting them into programs, because it would be too cumbersome, they just create 1 file for an object, or have lots of objects in a file, and create all the objects in 1 file, and then run the program which creates the objects, then when they stop the program, it deletes the objects. So there is no actual link between the object in a file and the object that the program creates by reading the data from that file, if you change the object in your program, it does not get saved to the file.
So programmers created databases to house these objects, but there is still a flaw in databases, they are hard to interface with, and mostly databases are just used to send data or retrieve data from, programmatically, you can’t really browse a database the way you can browse the files on your computer. You can, but database interfaces are not made to be easily navigated the way files and folders are.
As it stands, there is no way to store objects instead of files on your computer and interact with them in complex ways the way programmers can inside the programs they create.
If the idea of an object became standard the way a file and folder is standard, I think it would empower human’s a great deal to express things far more easily and fluidly than they can today.
Thanks for reading.8 -
When I was starting with Python at work I was very confused about identifying what is function, class, module, object instance, etc. just by name so I asked my colleague with PHP background to follow PEP8 and use meaningful names for objects. He's like okay and the next day I find this:
class vv(models.Model):13 -
When did the meaning of
"Statically linked", under Linux, change from
This binary includes all libraries it depends on and will run on any device that runs a sufficiently compatible hardware and kernel.
to
This binary will only run on these 3 Ubuntu versions, because it still depends on a fuckton of shared-objects of " default" libraries and this shit-distro is the only one, that comes pre-bloated with all of them.5 -
1.)Not defining functions and writing the entire code everytime needed.
2.) Initialising objects if classes and using them only for next 2 lines and then destroying them. -
My friend alfred who is a C# programmer, has got a threatening letter from some feminists. Apparently he's treating women as "objects" recently. :/3
-
I do operations on null objects to attempt to explain why my world is always crashing.
Then I resume coding. And crying. -
When life gives you class, make as much objects as possible so that there is a memory leak in the system...2
-
A remote SQLite database where huge blobs of JSON created by python’s pickle module were stored in a single cell. These blobs include things that should have been many-to-many, like users and competitions. This database (including the pickled python objects) was queried by API calls from an iOS app.
Beat that...!1 -
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 -
Im a junior android dev working in a startup. Wasted whole week on trying to parse some retarded json data generated by junior backend guy.
Im talking about objects with other objects as their elements, no use of arrays.
In the end had to redo his data in proper order so I could parse properly. Fkin waste of time.
At least now I know how to do his work, and won't be afraid to confront him with detailed criticism.2 -
The bouba/kiki effect is a non-arbitrary mapping between speech sounds and the visual shape of objects. It was first documented by Wolfgang Köhler in 1929 using nonsense words.
https://en.wikipedia.org/wiki/...17 -
Man I have no idea how my company is running as stable as they do. Every time I peak under the curtain of some piece of machinery I find such bad practices…
Just found out our in house database manager only supports listing all objects in a table, updating objects by first reading each row you need to update and only support “select *” queries.
This is after having to argue with some engineers that using http or grpc when interacting with the new service I’m writing in the none-jvm language is better than writing our own driver for their custom rpc and service discovery system.
But like honestly I’d be mad if these decisions had a visible performance impact on the business, but it somehow doesn’t… this is bizzaro world where all I learned from my 8 years experience as a professional goes out the window…1 -
Just finished going through a 45k++ lines of json objects to find those stupid objects with wrong formate !!
😣😭 and they are all numbers !!!!4 -
Woah TIL
"Kinder Surprise is a hollow milk chocolate egg shell containing a toy. [...] it is banned in the US since the Federal Food, Drug, and Cosmetic Act prohibits confectionary products containing 'non-nutritive objects'"
I loved collecting those toys as a child (and still love the chocolate)6 -
Are you familiar with chess? What classes/objects and methods/functions would you use to implement the game of chess? Who knows if checkmate is reached? What about timed games?
It always leads to an interesting discussion and you can easily throw out prodding questions if they get stuck. I've never had anybody give me the exact same answer, and it's been complimented post-interview a handful of times.13 -
!rant
when you find 3 spelling errors in the same line of code and realize that these are legit 'cause the objects and methods are actually coded misspelled.
That's when no one dare doing code review but simply it builds and its fine.
Luckily #NotMyCode -
Coworker: So should we just make a living document to keep track of how all these objects are going to interact with each other?
Boss: No, are you kidding? No one reads documentation!
I mean... he has a point...3 -
Knowledge of the day: A *wishlist* is something you put objects on, to buy them later for yourself.6
-
Android, the development side.
First it was cool to put stuff together and then i wanted to actually use the phone hardware and realized that the api is terrible and abstracted away in the worst way possible.
Like every java dev would make something like new Camera().photo("penis.jpg") and let the gc take care of the rest but nooooooooo you need persisted objects and datastreams and special permission checks.4 -
ProfaneDB is a database to store Protobuf objects, working on top of gRPC for cross compatibility.
May evolve anywhere towards a "Serverless" kind of solution; a GraphQL to Protobuf interface; may use SQL as backend...2 -
A: Hey yo, that function should only support up to 20 objects
B: Say no more fam
https://api.flutter.dev/flutter/...16 -
I need to stop treating an OO language as if it were a procedural language.
I have the tendency to turn my code into GOTO spaghetti even though I'm semi-aware that objects exist and that they are distinct.
I still have to get used to this paradigm.
My Java professor always swore by the Plato paradigm, i.e.:
""Platonism" and its theory of Forms (or theory of Ideas) denies the reality of the material world, considering it only an image or copy of the real world.
According to this theory of Forms there are at least two worlds: the apparent world of concrete objects, grasped by the senses, which constantly changes, and an unchanging and unseen world of Forms or abstract objects, grasped by pure reason (λογική). which ground what is apparent." (wikipedia)
Thinking in objects, abstractions and metaphysics is not something I haven't done before (I've practiced it during Sociology and Ethics with the whole Pascal Leibniz, Newton and DesCartes approach) but it's certainly not easy.
Then there was my cool Programming 201 professor who said: "Don't worry man, just read those great UML, Program Design and GOF books and it will all become easy, like a story. It'll all make sense.
I mean, I've graduated, I've passed my Software Engineering I, II and III (hard as hell) but since I haven't focused on those theories and practices anymore, I've lost my touch.
It's definitely not easy for a novice programmer to transition between paradigms..10 -
Gna gna gna Chrome you stupid sucker!
I have some objects that I animate using JS triggered CSS translate with a transition duration. Why on earth would Chrome think it's a good idea to apply that duration also after the animation when I zoom the whole page?!
OK, slap a transition end handler on the object and reset the transition duration when the animation is done. But FF doesn't have that problem in the first place, and even IE works as intended!5 -
Today in Rust I defined a function that takes Any and returns Any specifically so that parametric types turned into trait objects of this trait can still receive commands without having to know their concrete type.
Bridging static and dynamic typing is one hell of an exercise.8 -
Shout out those who love to nest objects inside structures inside arrays.
makeup [1].your.getMind()1 -
Fuck api docs which are blatantly wrong. Wasted several hours on building an API client with pagination according to the api docs.
Turns out the actual implementation did not follow its own spec / api doc and returns values without pagination. And some objects are not objects but arrays.
I mean, next time I build an API client, I'll just fire a dozen requests on the endpoint, see what it wants and see what I get and maybe guess right what it actually does.4 -
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 -
A simple object mapper for CosmosDB SQL API
Cosmonaut is an object mapper that enables .NET developers to work with a CosmosDB using .NET objects. It eliminates the need for most of the data-access code that developers usually need to write.3 -
Guys, seriously, i dying from writing documentation. I'm frustrated and bored to the hell. But i need it for others. How to keep my mind fresh and excited? Just looking inside Leximo and see how much i need to write. https://repository.cartio.dev/lexim...
I need a coffee.16 -
In office I work on a RedHat VM on a windows m/c.
At home I work on elementaryOS VM on a macbook.
My shortcuts are fucked. -
Colleague (Lead Engineer): Hey, check my code. I'm trying to group a list of Request objects by their id. Something is not working here
Me: * saw his code, had a lot of shitty loops, called all for a quick meet, changed his shitty mess to one liner
list.stream()
.collect(Collectors.groupingBy(Request::getId))
Walked out like a boss*
😎 -
Co-worker: So if you were to build a glove like what Ultron had that could levitate objects how would you do it?
Me: I'm not sure, but I'd begin by looking at the work Ed Leedskalin was doing in Florida.
Co-worker: Of course you have a possible lead on this...
XD1 -
My brain= processor
Your mouth= raw data
I only process the logic that comes out of your mouth and typecast it to my system's logic and try to fit you in one of my objects using a visitor pattern.if I need to create a new dynamic object , my system throws a "you are special" message. -
Me: Interview is in 3 hours, I'm prepared, it's non technical anyway, just be yourself.
Brain to me: What the fuck is big 'O' notation? Objects you mean chairs? Turing? That's some kind of robot right?
Also me: fuck....1 -
The new devRant avatar feature is so cool and there are so many ideas for customization being posted. Maybe at some point our dev community can build and submit custom devRant avatar objects according to devRant specs. I might even try to build a Bernoulli box 😀
Thoughts?1 -
Yesterday I spent almost 3 hours trying to sort an array of objects in java. I'm a person who has written a lot of python and dart code and java is just so daunting. Every simple thing is so complicated.
You can sort a list of objects wrt any parameter using a one liner in python.
Finally after copy pasting a lot of code from stack overflow the thing got sorted. And the worst part I don't even know how the thing works.4 -
ARRAY LIKE OBJECTS
Long story short, i am fiddling a bit around with javascripts, a json object a php script created and encountered "array-like" objects. I tried to use .forEach and discovered it doesnt work on those.
Easy easy, there is always Array.from()..just..it doesnt work, well it does work for one subset called ['data'] which contains the actual rows i generate a table from, but for the ['meta'] part of the json object it just returns a length 0 object..me no understanderino
at least something cheered me up when researching, it was an article with the quote: "Finally, the spread operator. It’s a fantastic way to convert Array-like objects into honest-to-God arrays."
I like honest-to-God arrays..or in my case honest to Fortuna..doesnt solve my problem though2 -
"There is a reason that we keep our variables private. We don’t want anyone else to depend on them. We want to keep the freedom to change their type or implementation on a whim or an impulse. Why, then, do so many programmers automatically add getters and setters to their objects, exposing their private variables as if they were public?"
-Uncle Bob, Clean Code.1 -
First you make a filthy JSON protocol where numbers are encapsulated into strings.
Then you document this little fact nowhere. Actually you don't document anything at all.
Then you make a shitty parser that ignores any exception. So that when I try to send my objects, it took two hours to figure out it was "my fault" as I was sending actual integers instead of strings.
I think you deserve to suffer a terrible agony for exactly the amount of time I lost.2 -
Fuck webpack.
..besides that what really grinds my gears is the cloning of objects in js. I do like js, but why can't I just say object.clone ? Or Objects.clone(object)?
I mean deep down an object is just 1s and 0s and I just don't know why, there is no standard or nice way to do this. Would this be technically be possible?
Maybe someone knows more about this whole thing, would be happy to hear.2 -
Not knowing what persistence was and copying JS objects with JSON.parse(JSON.stringify(...)) trying to make it “pure immutable”.
Fml.4 -
when you look in the mirror and see something unfamiliar behind you, remember
objects in mirror are closer than they appear.8 -
Me : Hey, can we add datas in the database so we can test every single possible situation with it ?
Worker : Nah, it's better that you don't touch it, lemme do it.
*Later*
Worker : Hey I've added data to test our code.
Me : *fetch data, see only three similar objects that fits in only a situation, I can't test the others" Thank you, that was really helpful.1 -
Tip: if you are doing a semi complex or complex query in Django and you have doubts print the SQL statement and analyze it. i.e print(queryset.query)
Just reduced a query to 1 join instead of two by just passing a list of int's instead of a list of objects. -
participating at an coding challenge.
the mission is to write an game solver for an game engine - in java. based on astar, pathfinding should be made possible by cloning objects.
never seen a so hardly misconcepted challenge, where character instances and their variables are static and contain uncloneable data😂 oh god what a waste of time realizing this bs1 -
Why do SAMBA network drives have to suck this much? Yeah I understand that compiling to a network drive is probably a bad idea just for performance reasons alone but can't you at least not fuck with my git repo?
$ git gc
Enumerating objects: 330, done.
Counting objects: 100% (330/330), done.
Delta compression using up to 24 threads
Compressing objects: 100% (165/165), done.
Writing objects: 100% (330/330), done.
Total 330 (delta 177), reused 281 (delta 151), pack-reused 0
error: unable to open .git/objects/7e: Not a directory
error: unable to open .git/objects/7e: Not a directory
fatal: unable to mark recent objects
fatal: failed to run prune
$ git gc
error: unable to open .git/objects/00: Not a directory
fatal: unable to add recent objects
fatal: failed to run repack
$ git gc
Enumerating objects: 330, done.
Counting objects: 100% (330/330), done.
Delta compression using up to 24 threads
Compressing objects: 100% (139/139), done.
Writing objects: 100% (330/330), done.
Total 330 (delta 177), reused 330 (delta 177), pack-reused 0
Removing duplicate objects: 100% (256/256), done.
error: unable to open .git/objects/05: Not a directory
error: unable to open .git/objects/05: Not a directory7 -
I hope this book finally makes me understand factories that make builders that make classes that make fucking objects.
Sorry for the bad light btw.8 -
Found out a contractor stored 2.5 million rows of user info as json objects. 2.5 million is our sample size. Please tell me this is nuts right... Searching that would be taxing right?4
-
Moment.js, because without it, formatting and converting JS Date objects to other timezones is a bitch
-
Fucking Django is the only project thaat claims to be for perfectionist but actually is a steaming pile of spaghetti code, data transfer objects, configuration objects and useless wrappers and shit. I mean this shits made by adults with computer science degrees how the fuck can they get that shit so wrong?16
-
1. Commented code instead of actually cleaning it up.
2. Returning default return variables instead of rewriting obsolete code. (Generally if/else conditions with return). So instead of removing the if/else statements i return default value(null or empty objects). This is when the case of if/else will never arise. -
You know what's funny?
Gender bias at work is usually AGAINST MALES, like seriously I had a great year in my new job and I'm happy about it, but end up finding out that the boss awarded only females in our team😒
If society should stop treating women like objects well how about treating men like human beings?
There was weeks where I saved the bosse's ass and worked for over 60 HOURS and still nothing.26 -
Time it took me to write REST API and DB objects = 20 mins
Time it took me to to write a shitty Python 15-line script that parses a text file with regex's = 2 hours after I asked Stackoverflow
Don't even know what to say.4 -
The company I worked for had to do deletion runs of customer data (files and database records) every year, mainly for legal reasons. Two months before the next run they found out that the next year would bring multiple times the amount of objects, because a decade ago they had introduced a new solution whose data would be eligible for deletion for the first time.
The existing process was not be able to cope with those amounts of objects and froze to death gobbling up every bit of ram on the testing system. So my task was to rewrite the exising code, optimize api calls and somehow I ended up in multithreading the whole process. It worked and is most probably still in production today. 💨 -
Maintaining a C# .Net application as a Java developer
with a 30k line auto generated soap service.
Where each service gets its own objects...2 -
the company I work for has code that's very procedural which makes cringe as I strongly prefer object oriented.1
-
If you feel you're not confused enough in life, try writing JS for a Rhino engine interface implemented on a Java codebase.
I have to deal with stringified JSON, native JSON, java JSON objects (org.json.JSONObject) and all the different attributes and functions specific to each of these objects.
Even "Why are the Kardashians so famous?" doesn't confuse me as much as this shit does.2 -
Smalltalk's become: is my favourite function (well, method) from any language. For those who haven't Smalltalked, here's a great description of it: https://gbracha.blogspot.co.uk/2009...
From a design perspective, what's not to like? You get to design your object graph in time as well as space, the state transitions of your objects become simple to represent.
It's also great for job security too ;)2 -
Client deletes erp record with a massive amount of aggregate objects. Calls and almost has a nervous breakdown.
Thank god for soft deletes, they make awesome invoices. -
OOP is so ass, classes that extend classes that need objects, of classes that extend classes , passend to their constructor which constructs an object to be given to a constructor of a class that extends a class that implements three interfaces. And in the end it all could have been done with a single function and all of these classes get used a single time.19
-
So it's Valentine's day here in the states.
I don't know what to do for my GiF.
All I did was rm -rf objects around the apartment and she seemed pleased...Am I doing this relationship thing right?6 -
Seeing some Ruby just reminded me of something.
Fuck Objective-C. What kind of lazy fuck makes C object oriented by stapling SmallTalk to it? A better name would be "C: Now with Dissociative Identity Disorder...oh and objects".
Apple apologists make excuses for this miserable language all the time...why? Because it's the only thing Apple would give you?
Swift is definitely an improvement though.4 -
Got a nice solution, part of a micro-services system. Interfaces where they should be. Single responsibilities. Easily unit testable (and plenty of tests in there).
Then the Senior rewrites things because he didn’t see the point in having interfaces and couples every layer to a shared set of objects, and those objects are now shared by all the other micro-services too. One change in one and we have to repeat it in every service. 🤦♂️4 -
After many days of trial and error,i finally found my preferred way of passing Django objects and variables to angularjs,now I can create killer apps with Django and angularjs.2
-
"Objects and their manufacture are inseparable, you understand a product if you understand how it’s made." - Jonathan Ive2
-
well well well.
i seem to like javascript syntax more than php.
there, i said it.
it´s not a post about php being bad. in fact i did and do nice things with it. but in the last few months i learned a lot about javascript and now the time has come i get a grasp on opinions of php being inconsistent. and a growing feeling of love for objects. maybe i just have not reached the dark pits of strange js-comparisons like similar objects not being equal. but still...
no, php, i will not abandon you. but sometimes we have to talk about our feelings. -
When you decide to learn JavaScript and you make a object and realize it is a method, nothing like Java objects😑9
-
Having a hard time thinking the alternates to if statements is a good idea. I was genuinely curious how this was done. The examples I am finding seem to just spread the logic everywhere across multiple objects. To me this makes the logic objectively less clear. I didn't understand the obsession with objects until I saw the examples that creates a fuckton of boiler plate objects. How someone can say this is preferred over a few if statements boggles my mind. I actually am trying to understand the functional mindset as well. It is not going well for me. I can sorta see some value in using a map. Technically a lookup could be faster. But again it spreads the code all around adding more boilerplate.
https://blog.bitsrc.io/reduce-if-el...
https://dev.to/phouchens/...
Is it because these are contrived examples? I initially searched to find ways of reducing ifs in a functional approach. I did find it in the second example. I was however hoping to find that by lazy eval or something. I see people making references to how one you "get it" functional logic is easier to understand and evaluate. I cannot tell if this is straight up gaslighting or my brain is just too fucking imperative.11 -
When I close my eyes I see identical objects in array, forming random numbers.
Last time it was a 7.
Anyways, gotta sleep.1 -
Spring boot does very much automagically.... but to find every possible configuration is hard....
I found out that it has an automatic config for Scheme Server... but how the fuck to configure it 😑
And do I still need avro made domain objects 🤔 it's hard to fight through all these documentations and versions of spring. 😖 -
Why somebody would think that allocate huge amount of objects in the static memory make any sense?? Why??? You need to allocate a bloody database context and all the allocation of your IOC containers and keep increasing!!!
-
Basic graphics pipeline through chatGPT, took a few layers but it should be able to draw out most well described objects.... I hope5
-
Switching to Java after several years of c# experience(new project)... and it feels like lobotomy has been performed on both the language/machine and my part - no var keyword(yet), horrible work with the collections (but thank god we have at least the streams), basic things like Long are actual objects(not a value type), strings must be compared with .equals ... and suddenly even simple tasks take me horrendous amount of time.9
-
Today I got the chance to try 1 of the 9 HoloLens available in my country. I'm completely mind blown. The ability to incorporate virtual elements in the real world and make them behave like real physical objects is incredible! I really hope AR gains traction to buy an headset for myself.
PS: Project X-ray is one of the most fun games I've ever played.1 -
String concatenation using + instead of StringBuilder....
Using prototype objects instead of singleton wherever required..1 -
Interface is the most misleading term in .Net. It's not an "interface" when an object requires a set of objects defined by another object! It's a template if anything! I'd even accepted CookieCutter or Mold.
-
!dev
I started learning how to draw pixel art.
I bought aseprite and will be drawing some 16x16 pixels.
Do you know any useful guides ?
What I’m interested is character drawing and animation.
Drawing objects and nature like trees, boxes and stuff.
General techniques.
I already found some useful stuff about tile sets.
Once I finish drawing couple hundred of tilesets I want to proceed to more complicated stuff.2 -
I miss functions that do stuff.
Just a simple logic piece that does the stuff it wants to do. Without classes, objects, interfaces, frameworks or configurations.
I mean, yes, wrapping the functions behind the implementation of an indifferent interface is usually a good call.. As long as it stays simple.
But it rarely does, doesn't it?5 -
Swift is such a horrible language now that I am actually using it. You have protocols that don't behave like interfaces, classes that aren't objects, structs that aren't passed by reference. And stupid counterintuitive generic grammer. I feel scammed.1
-
Suggestion: make notifications updateable objects, so that they can be condensed. For example, "xyz and x other people commented on your rant". That way we don't have 60+ motifs and its easier to distinguish them.7
-
Dear God, why are punishing me by another bug report related to Edge?
Console dock freezes commonly for MINUTES, literally. It doesn't support objects, so every object is very usefully converted to "[object Object]" string. And now I am discovering that change event on input is magically not firing?
What a day. This would be solved in Chrome or Firefox in a matter of minutes, for a same time Edge doesn't even manage to render a page with dev tools opened FFS...2 -
A database fetch. All rows at once. Not that many rows, maybe 50.
But oh boy when someone forgot that the repository is wired to magically inject SQL that joins other tables and does ineffective loops to create thousands of objects in the background.
Been fun finding memory hogs in the codebase. -
I learned Git in the most ridiculous way possible.
Noob me, is using VSCode and i tried clicking the git icon. Now, i didn't know what i was doing and i suddenly made a git repo and i just checked on things (add changes and commit) and little do i know that it was all absorbed. I got skeptical (spying on files, i didn't know what's happening, etc.) so i clicked the "x" button and it warned me that it will be "completely deleted" and it will be an "irreversible action". Due to my stupidity, i pressed okay.
Then that was the time i knew, i fucked up.
But hey ho it took me 12 hrs to recover all files (1600 loose objects) that has been deleted using a 3rd party app (without any master, no last commit message, no everything, just objects a.k.a the blob files that git saves). I tried looking for easier ways to get the files, but it was there in front of me the whole time, so it took me longer.4 -
I don't understand how I/O streams work. I mean as a userspace developer i saw the stdin/stdout streams as magical objects that i could read or output infinetely in a continuous way, without caring how much data i write or read (ok, not entirely true because overflows)... But now i'm making an os kernel and i really don't know how i'll implement them..... :(1
-
Everybody is bussy!
So let's going to give this mess to the one who never worked with mongo, does not know the objects in the DDBB, add to it some weird way to build queries in java to it and hope for everithing end well!
End well = need to be done today.
Guess what? Not for today! I have no clue of how to clean this shit.1 -
dumb mistake on my part. so when accessing an AWS S3 store via the Java SDK, make sure you don't use the virtual-hosted URL to connect and to list objects in a bucket. you will pull your hair out when you see puts and gets work but list bucket doesn't. a major hint is if your put/get/delete calls don't accept the bucket name but instead accept the top level prefix, then you're doing it wrong :/
-
A beginner in learning java. I was beating around the bushes on internet from past a decade . As per my understanding upto now. Let us suppose a bottle of water. Here the bottle may be considered as CLASS and water in it be objects(atoms), obejcts may be of same kind and other may differ in some properties. Other way of understanding would be human being is CLASS and MALE Female be objects of Class Human Being. Here again in this Scenario objects may differ in properties such as gender, age, body parts. Zoo might be a class and animals(object), elephants(objects), tigers(objects) and others too, Above human contents too can be added for properties such as in in Zoo class male, female, body parts, age, eating habits, crawlers, four legged, two legged, flying, water animals, mammals, herbivores, Carnivores.. Whatever.. This is upto my understanding. If any corrections always welcome. Will be happy if my answer modified, comment below.
And for basic level.
Learn from input, output devices
Then memory wise cache(quick access), RAM(runtime access temporary memory), Hard disk (permanent memory) all will be in CPU machine. Suppose to express above memory clearly as per my knowledge now am writing this answer with mobile net on. If a suddenly switch off my phone during this time and switch on.Cache runs for instant access of navigation,network etc.RAM-temporary My quora answer will be lost as it was storing in RAM before switch off . But my quora app, my gallery and others will be on permanent internal storage(in PC hard disks generally) won't be affected. This all happens in CPU right. Okay now one question, who manages all these commands, input, outputs. That's Software may be Windows, Mac ios, Android for mobiles. These are all the managers for computer componential setup for different OS's.
Java is high level language, where as computers understand only binary or low level language or binary code such as 0’s and 1’s. It understand only 00101,1110000101,0010,1100(let these be ABCD in binary). For numbers code in 0 and 1’s, small case will be in 0 and 1s and other symbols too. These will be coverted in byte code by JVM java virtual machine. The program we write will be given to JVM it acts as interpreter. But not in C'.
Let us C…
Do comment. Thank you6 -
What the fuck is happening with Windows 10 after April 2018 update?
1. Opened my local github repo in external drive
2. Made changes
3. Try to stage, get this weird "error: unable to open object pack directory: .git/objects/pack: Function not implemented" error.
4. Googled it, says check drive for errors.
5. Scanned drive, fixed error, drive has no errors.
6. Opened my repo, all file sizes are "ZERO", including my changed work, gone, poof. -
I wasted all of yesterday trying to create a business object in staging which can't be created with the admin panel instead of modifying an existing one to fit the case I was testing, because i forgot that this is staging and just assumed that existing objects are not to be touched.
Flu Brainfog sucks.1 -
So a monad is basically a specialized object for converting to and from a datatype. So FP has specialized objects. Monad marries OO with FP in that sense. In C++ I would do this pattern with a class because it makes sense to encapsulate it there. Or at least a namespace.
Change my mind.
https://en.wikipedia.org/wiki/...7 -
Trying to implement DDD into this current project of mine but the whole concept of converting Eloquent objects into plain entities seems to be more work than it is worth.
But the whole methodology of DDD also seems rather complicated.2 -
Disclamer: I don't want to give out what app I am talking about, so all names will be random to just represent the nonsense and my frustration.
So I was working with that app's API....
To begin with, some retrieved Objects have collection (iterable structure) of "Thing" objects, called "Things". But... there can be max one element in that particular collection!
Ok... I get it... I might exaggerate a bit... fine, let it be.
I had to mention it for the further part, and also got to mention that "Thing" objects are globally available and predefined, and Objects can only choose one, unused "Thing".
To the point.
Someone thought it would be good to separate representation of one structure into two classes.
We have collection of "A" objects ("As"), which have "Name", "Things" and other, mostly GUI/config related attributes.
Collection "Bs", of "B" objects, they have "Name" and rather lower-level attrs.
The "As" and their attributes can be set in the GUI, but the list where you do it is named "List of Bs" and vice versa.
Interesting, huh?
I had to use both "A" and "B" definition for given name, so I tried to map it... and things gone South.
Collecions have "Get" method with name as an argument.
But it turns out that while the "A" use its GUI name all the time, "B" uses either name that can be found in "As" or, if not all "Thing" objects are used, the "Thing" names.
Example:
global "Things" = "t0", "t1"
"As" = "a0"("t0"), "a1"("t1") -> "Bs" == "a0", "a1"
"As" = "a0"("t0"), "a1"() -> "Bs" == "a0", "t1"
"As" = "a0"(), "a1"() -> "Bs" == "t0", "t1"
That means if at least one of "A" objects have empty "Things", then the mapping will fail.
Only solution is that the app works only partially when any of "A"'s "Things" is empty, so I might raise error too, but I have to provide solution that will work even in the cases when the app don't care... so... not gonna happen.1 -
* Create S3 Bucket
* Enable versioning
* Setup lifecycle to delete small temporary objects after 7 days
* Wait 7 years
* Say "Wow, I was fucking stupid, and I've learned a lot since then."
* Write devRant post
* Profit with lower monthly AWS bill1 -
Our OOP lecturer spent the first 6 weeks of the module covering basic programming concepts we had already covered in 2 previous Java modules. Halfway through the module before he even mentioned objects. Biggest waste of time ever.
-
How is it that an error fixes itself and a new error pops up where there should be no error?
Just when I thought I was getting the hang of it..
🤔 -
Okay so update/JS pt2
This is just me throwing my thoughts down and some questions
I've been practicing arrays/objects and loops more and I'm getting more understanding it helps that you can do them both at the same time. But like I need more looping techniques (if that makes sense) like instead of always using for(let i = 0; i <= x.length; i++) and I havent completely learned how or when I use for(x in y)
Questions.
• what's the difference between class objects and objects that look like a python dictionary
• when should I use classes over the other kind of classes
• any good resources and projects I can practice with loops cause I'm kind of running dry on ideas
and I dont wanna google cause I barely already have no social interaction2 -
Customer: your app is not returning all the objects in my bucket
Support: check console log 500 server error, ssh into box check logs exhausted memory limit.
Sudo vim /etc/php.ini search memory limit
Update to a high number restart Apache sit back and think fuck did I set it to high will it blow up my server.
Only time will tell!!! Sorted out the issue until the next user with millions of objects in their buckets -
Maybe someone can help me there.
I have to make a DDD project and I can't figure out in which layer I should put classes that - for example - convert objects from DAO to DTO or the Serializing functions.
Does someone who already made some. DDD help me?2 -
I am very thankful to C as I face less pain while dealing with pointers and memory allocation and deallocation in C++. I am very thankful to C++, as I grasp OOP and template concepts out of it and it was also my first language for DSAlgo implementation. I feel very fortunate to move to Java after C++ rather than python. Although Java's design is f**ked and it feeds on a computer's memory, it taught me to deal with objects( unlike C++). It taught me how objects are clearly different than primitive data types like int, float, char...And best of all, Java provided me everything I need to safely switch to Python, it's all because of Java, I can clearly understand the working of python. All the stuff which I find weird in python before is sounding logical to me now. As java taught me how to deal with objects, I am confident to say that "I CAN DEAL WITH PYTHON". With respect to all my 3 prior languages: C, C++, and Java.2
-
This year when I started highschool because I'm at the, uh, math-comp sci, I guess, profile.
(Here in Romania there are highschool profiles that add specific objects to be learned, also math-comp sci is the only translation I can think of for mate-info)2 -
So dynamic typing means you can just add members to objs on the fly?
But why hadn't I noticed that before giving a long lecture about classes being "molds that we cast objects in"?
Ah, yeah. That's because I'm just learning it at the same time.33 -
Dear Java, I don't care about your tight rules and patterns; I just want the data.
Do I want some values from some far, hidden-away objects? Oh no, I can't, because I must respect the OO contracts between those objects and interfaces and type safety and blah dee bla.14 -
TypeError: can't pickle _thread.lock objects
someone please guide me .....
pick.dump(model.fit(trainX, trainY, epochs=25, batch_size=1, verbose=2), filename)1 -
Besides all the other problems with js, I have to ask the experts:
What is the error or error classes commonly caused in javascript by conceptually treating prototypes or dictionaries as objects proper?
How or in what way does this hurt development as opposed to languages that make distinctions between prototypes and objects?8 -
I was watching a YouTube video about c++ and the guy used player{1...n} in a game as an example for objects of a class Player.
That was A-ha for me 😅.
I never got that in grade school when teachers used fruits and animals as examples 😂.2 -
"Objects and their manufacture are inseparable, you understand a product if you understand how it’s made." - Jonathan Ive
-
So it's been a long semester and I was writing my final project earlier today. I wrote a for loop which removed objects from the list it was iterating through. And my linter let me. Why do I even use you, pylint? I could have saved hours of debugging if you gave me a message that I was doing a stupid thing5
-
I've never had any use for Pythons tuple unpacking until today when building objects from SQL selects. I always thought it was kind of a lame feature, now I think it's awesome.
-
I've mentioned this before, but I never really understood bit flags until I tried out Cocos 2D and read about how you implement hit detection. You identify different rendered objects with an enum value, and it would spit out a result every frame that you use bitwise logic on with the enum to determine which objects were touching. Such a simple and elegant way to represent combined state.
It may be elementary for some folks but I was not a CS major.1 -
[Rust] What are alternatives to argument drilling for something like a string interner which is technically a memory leak so it really shouldn't be global but at the same time all but a couple top level functions depend on its existence? I'm aware of context objects and that's all ChatGPT could give me as well, but I'm wondering if there's more to this problem than that.1
-
NEED AN URGENT HELP HERE!!!
As much as I try to stay away from the satanic language that is javascript, I have to read up on it if I need to pass this semester.
Guide me towards the different types of objects in javascript, anyone?
Here's what I know so far- js treats everything as an object, but what I don't know is that are there categories? [the "everything" referring to the primitive data types]14 -
hey frontend devs,
i got a qweshtiun:
how come half of yous communicate in wordsalad?
also: ur methods are functions and ur objects are structures. wth is it all about?13 -
Why don't we have a virtual world API? Something that would support concepts as well as physical objects? Something that we could definitely the world in so we could simulate reality?
And if we could connect it to REAL LIFE?2 -
Just spent an hour salvaging some code from an app project I abandoned so I can reuse it in the future and add what I salvaged to a portfolio of small things I've made.
It was a simple multiple player name menu that generated player objects once the user was done entering names.
Loads of potential future uses.
No point letting it sit inside an abandoned project even if it is somewhat trivial to reproduce. -
One of our dev team had the task to do a bulk operation for thousands of objects.
So time passes by and they implemented it. But in acceptance testing they found out that this operation takes 4 minutes for 50 objects. This is not what we call high performant when we talk about 20000 objects per bulk operation 🤔
Well, their PO asked them to solve that performance issue. And guess what, they decided on their own that the issue can be solved to reduce the bulk to 20 items so that it only takes 2 mins to run!
Really guys, is that the best you can come up with?! 😲🤬1 -
It seems to be fucking impossible to just read a part of an XML file with c#'s XmlSerialisation and deserialize it into objects of a single class and add other objects to the same XML without loosing other nodes.
Go fuck yourself Microsoft3 -
Am I the only one who thinks OOP in Javascript isn't always the best option? I really like structured code with classes and objects but sometimes it's just fun and satisfying to write a buttload of functions to do all sorts of things and build your code with that.1
-
I learned today that learning programming in MVC architecture has nothing to do with programming but understanding objects, layers, architecture etc.
Please dear tutorial creators, introduce me to the subject with explanations of those and not with some code of mvc or whatever. -
gulp started throwing premature close on useref:dist yesterday
said it was on a dependency
spent whole afternoon checking gulp issues and reviewing dependencies
as it turns out, it was nothing even remotely related to the error message
it was a spread operator used to merge objects
why must the Lord test me like that -
At work we use a custom python library to parse XML responses from an internal API to objects. I literally spent half an hour pondering why an if statement was misbehaving. Turns out it parsed <tag>false<\tag> as obj.tag = 'false' instead of the boolean False which obviously made "if obj.tag:" misbehave 😒
-
Being a person prior to Dev work. Lol... Jk.
Honestly though... I'm still new at this but I feel like me being a middle ground helps in tech discussions with the business side of the house. I translate for the senior dev and everyone seems to appreciate knowing what he's meaning exactly when he starts going off on functions and objects. -
A self-proclaimed 'Technical Architect' who didn't understand how Objects behaved in Java. The same guy also decided it was a good idea to check a config file for each environment into git, instead of using dependency injection like we had done everywhere else.
-
I was talking to some post doc researchers today about a complex logic problem and a fresher interrupted and said, I think you can do that with objects... (The logic problem didn't depend on how the solution is modelled)
-
Newbie in Python here. Blank 0 newbie. Now, the question for the relatives.
What is the core object of Python when talking to objects, functions, and relationships between those last.2 -
I just like bulding silly things, my ideal devjob would be one where I could just make random junk that makes me smile all day...
Like recently I made an NoSQL database using azure AD. They give you 50000 AD objects free, but I found you could encode all sorts of data in the AD objects variables. So basically I setup a framework that uses Security groups as Collections, AD objects as Documents, and object variables as key pairs.
It's really slow, like roughly 50 queries a minute, but hey. It was fun proving it could be done...
Yeah, that would be my ideal devjob :P that kind of stuff all day2 -
I guess I'll just die.
Using unity for a commission project:
Have a CCG-like setup, the cards inherit from Scriptable object, need to serialize a card inventory for the sake of persistence.
Attempt 1: XML serialization: get fucked, can't serialize dictionaries (what the hell)
Attempt 2: using data representation of the dictionary contents: get fucked, can't serialize Scriptable objects because they have to be handled by the engine...
Well okay, what if I use a Scriptable object to keep a persistent dictionary?
Attempt 3: Scriptable object with dictionary: get fucked, the dictionary didn't persist
Well now I'm starting to lose it, I've tried so many things, XML, Binary and JSon serialization, Scriptable objects, data representations, I'm really running out of ideas. I can only think of one more option: throw the Card objects into a Resources folder, an build a set of comma delimited strings to serialize. This is stupid.
Fuck Unity. Shit like this is why I'm making my own engine. Every week I find some new peeve, some new way that unity is full of redundancy and poor design, architectural flaws and workflow deficiencies. I don't know how much more of this I can take.2 -
I HATE dealing with Map objects in Java. Much like everything else in Java, the API is far too verbose. What's more annoying is how Oracle seems unbothered to improve it.5
-
My whole life is one giant NullPointerExeception, looking for things, for people, for objects that either don't exist or don't exist where i'm looking.1
-
In C# I want to use 'using' on any damn temporary object I please, but it only works with objects that implement idisposable..6
-
this aint working for some reason. unless im missing something then im completely stumped.
https://gyazo.com/37598c63be6af4702...
can someone please tell me what’s wrong?
It’s an array of objects that im trying to turn into options for a selector with the id prop being the value and the name prop being the actual text but it keeps saying select.add or appendCHild isn’t a function. now im lost.
god i hate tests, i know they are needed but damn5 -
It's now 3am and this issue has been keeping me up for inner an hour... In Entity Framework..
I have a 2 tables/classes in a relationship: Item has many Tags.
I'm trying to delete some Tags using context.allTags.RemoveRange({list of tag objects I want deleted}) but now for some reason it's trying to reinsert/duplicate all Items and thereby violating all uniqueness constraints.
Guess will post the source code TMR but this is like wtf?1 -
Almost every time I discover GOD Objects and Lava Flow in a project, I also discover a GOD developer with lava thoughts.
-
I cant believe threejs requires me to write a c++ code so i can use 3d webgl objects in javascript11
-
Struggled whole day to remove duplicate objects from a list in java. Those objects (of a custom class) contain a unique id, the remaining properties can be identical across list items.
Wondered why hashset.add() always returns true and thus duplicates are still inserted.
Little did I forget about things like equals() and hashCode() 🤦1 -
I had written a feature that stored some data for all methods in a code base. And it worked in 99.9% of all cases, but for some projects, somehow there were errors in the logs that I couldn't understand.
After hours of debugging, it turned out that I inserted the method objects into a map, and the (existing) base class for these objects used the character offsets for the method's start & end in the hashCode() implementation. This meant that in the (extremely rare) case of two methods in two files with the exact same start and end offsets, inserting them into a map would overwrite the previous value.
Once uncovered, this bug was trivial to fix ;) -
Whenever I see an ORM that supports creating and transforming objects in bulk, I can't help but think about the poor misdirected users who forced it to do that. It's an Object-Relational Mapper. It maps objects. The whole concept isn't designed for bulk operations, the point is that you add logic to each and every record and convert your operations to SQL so that you never have to keep a lot of them in memory.4
-
On the office we have began to discuss which is best practice in a REST API when reference other objects.
Things like:
A)
```
{
"id": 1,
"field1": "value1",
"referenced": <id>
}
```
or
B)
```
{
"id": 1,
"field1": "value1",
"referenced": {
"id": <id>
}
}
```
I prefer B. What do you think?4 -
Is WordPress' use of God objects really such a big problem? I mean, sure wp_query is used for every possible purpose and is the most mutated piece of horror every. But what is the harm?1
-
Does the Go GC move heap-objects?
I found some articles that say it does, but in the sync package, there is the copyChecker type, which could only work if the GC never moves memory.6 -
!rant
so i've been playing around with this idea for some time... a relative reference frame physics engine.
why?
because in short, if it's not completely stupid (which I'm still not sure), and if it would work how I think it should/would, then it would solve most (if not all) problems current physics engines have with moving inside/on moving objects (which are inside/on other moving objects)...
...anyone reading this has at least a slight idea what I mean/am thinking about?9 -
!rant
had to give a short presentation on the origin of OOP at work. It turned into a neat little discussion on what OOP means to you based on your experience and what you've been taught. I had always thought it just meant working in terms of objects and polymorphism, inheritance, etc. were good practices.
Found it interesting that when I started reading into Simula, Smalltalk and Alan Kay's work, early 'uses' of OOP were different from each other and today. To me it seems it have originated obviously, from the desire to work with real world objects but branching off to being more closely related to the actor model and the idea of message passing.
Was wondering if anyone else has looked into this topic or has their own opinions based on experience.1 -
Do any of you have suggestions for pin sized tools/objects. Like I already know about laser pens and screwdriver pens but do you guys know of anything else that could fit in a dress shirt pocket?
(And I mean anything. From exacto knife to sonic screw driver)6 -
So int and datetime are not nullable in c#, so you cant assign null to them
While you can't compare int to null (int a; a==null won't compile) you can do it with datetime objects.
Microsoft, can you please get your shit together?
Took me like an hour to realize my date is actually the 1.1.0001 and not null.1 -
Hours and hours and coffee and tears went into my last debugging session. I couldn't for the life of me figure why unity interception wasn't creating the proxy objects. I was this close *Grabs an atom* of rolling back everything unity related, when suddenly, out of nowhere, a fuc**ng INTERNAL in the afromentioned class caught my eye...
Anyway, lets keep on coding :D :D -
NodeJS' url module of course doesn't include __proto__ when enlisting parameters (in /?__proto__=hi for example).
People using objects as maps are insane. They are so insane, that they don't even realise that. -
Why is it a big deal that arrays start att zero and the length att One? It's logical... Arrays as an index in memory and length as the... Length of the array (numbers of possible objects in the array)4
-
why are there some mutable objects in java? Why can everything just be immutable? Are there any disadvantages?5
-
Just spent the last 8 hours writing Mockito doNothing().when(...) scenarios on mocked objects.... Then I realized mocked object methods already do nothing
-
I love and hate javascript. I set out to do a fully ajax/state driven form interface that operates with multiple interdependent data objects which all extend a base class.
React/Angular may have been a better call but I just didn't have time so I needed to rapid prototype in jquery /vanilla JS.
I'm in the midst of learning and refactoring all the ajax calls to promises and then to async/await, so it's a huge learning experience...
Meanwhile I've got to build objects to represent the data on the backend which is all legacy OScommerce/PHP
Hell of a ride. -
Freaking RESTful API's.
Never worked with one before and I'm using Django Rest Framework.
Currently working (trying to) with Angular 2.
Spent lots of time trying to make angular work because ng needs arrays instead of objects when I finally realized it was a matter of the API.
Have no idea what I'm doing5 -
Is there ever a fucking reason to do a get_attrs call in python when you could just use a fucking explicit dict or just idk use the fucking typing system to implement a fucking interface? Like why the fuck should anyone ever be using get_attrs and strings to diddle objects?2
-
I'm going insane.
So let's say you have an object in database, with 20-30 related objects (Or lists of objects) (All related objects have a foregn key to the "main" object).
Now, as long as you just edit/create thinga everything is fine.
But the deletion... Oh MY GOD
"Just put on delete cascade", right ? RIGHT ?
WRONG ! presence of some objects should block delete, while others can be deleted and some are "situational" depending on the first object state.
So delete operation with all the checks takes .... 1 - 2 seconds.
Seems fine ? WRONG ! When you have 40 or more objects to delete, even 1 second is too long.
Should I say "fuck it" and just write a stored proc which will crash if object cannot be deleted for any reason ? because with Entity Framework, I don't see how I can do it effitenly.
But I HATE stored proc, after couple of month/years noone remembers how they work...
RHAAAAA.
Ok I feel better.8 -
The ability to generate to generate all of my data transfer objects/, data persistence objects/entity, and unit tests for those.
I love having solid data models before I begin to work with behavioral models but it's a lot of manual work. -
Who else finds HTML/CSS to be just plain bad?
since that's what the web adopted, apparently no matter what you are developing if it involves a GUI then the design method almost always follows in the same path as the web.
that's not the issue though, the real problem is that the web adopted a very horrible way to create a UI, while HTML might have been fine for 90s-style websites I just feel like its a very lousy way to create a modern interactive webapp UI, its just very painfully obvious that it wasn't designed for that purpose. remind me again what HTML stands for? "HyperText Markup Language" yea that sounds about right. and CSS really doesn't help but double down on the flaws of HTML.
on a whim I can come up with a better method:
instead of the weird <body><footer> structure, why not have say "objects that flow in a 2D space", you define the parameters location and dimension of these objects, with something like javascript they interact with each other and just like div in HTML objects contain smaller objects.
this makes a lot more sense than the footer/body design or the obviously duck-taped attempts at controlling the style in CSS, like flow, and absolute-position.
am I alone in this?9 -
If you use PHP with DI, in a single cli application, why don't you go get pegged with a catus.
- source wasting an hour trying to debug, why DI keeps feeding wrong arguments to objects4 -
Design question for y'all
Context: python lambda
Better to make classes for dictionary objects holding strings between methods
Throw strings around separately
Throw the dictionary around6 -
Me: GUI team needs help from backend team to add UIDs to a (shitty) object in (their in-house shitty) db.
Backend:
Backend can display these (shitty) objects properly, why can't GUI use the entire object as composite primary key? Backend can't just add some random UID to fix GUI display bug.1 -
So I am working on a Java library with minimal dependencies. Everything goes well until you dont want clients knowing how to construct the internal objects and you dont have a depenency injection framework to help.
Unit testing becomes that bit trickier1 -
ping REST API that is written in rust
it has specs. it will return json with result or error in it.
it's just returning result: null and no error
this is written in rust. how are you writing me responses with null objects in them? rust doesn't have null! how broken is this thing.
SAFE23 -
Frustration is starting a very large data object with multiple child objects while a project wide refactor is underway changing the MVC architecture and introducing serialization.
-
Is there a debug tool in Visual Studio that acts like a global HashMap<String, object> that you can add random objects to so that you can verify which objects are the same instance between breakpoints and view the state of an object that you had access to but is not in scope at a given breakpoint? I'm debugging a GUI app right now and it's an enormous pain in the ass to track identities, I resorted to adding random properties and statics to classes just so I can express this basic ass persistent debugger state6
-
Here is the REST API design of my LEAD programmer
# Access the API
1. Get access token with out username and password (GET /token)
2. Sign in with username, password and add access token as query param (POST /user/auth?token=[access_token]
3. Call other resources by adding token as query param
# Create new objects
- He uses PUT method in every resources to create new objects4 -
How much of a security risk is it to serve static data from a json file on flask? Values are posted from a mobile device to a server to groom objects to return. My coworker is giving me a lot of shit for it as the file is accessed through a relative path, but the file names are checked and sanitised. He says the objects should be in a database.3
-
I have to work with extjs again (rant). How is this still a thing? I know you can get things done very fast (if you are already familiar with extjs). But does it scale? Can you recommend extjs for large Enterprise software? (I have to use JS (Objects) only)
-
can somebody tell me why MIT gamelab Slower Speed of Light game makes me feel vomit when the game progress?
It generally happens when I collide with more than 40 objects.3 -
Sorta just had a realization but wanted to confirm if that's how it works.
@Bean adds the object to global objects collection?
And @AutoWired in a object returned in like @Bean ClassA classA() { return new ClassA(); }
Gets the instance from these global collections?
In which case Spring is just a way to use global variables/singletons... Isn't that like bad?14 -
Save method returns true. No validations errors. Everything looks good, except that a boolean field that controls the record has been set to false from true...even though it wasn't in the objects changeset!
-
"Objects and their manufacture are inseparable, you understand a product if you understand how it’s made." - Jonathan Ive4
-
Anyone know how to get the type hints and doctags to show up in opencv in pycharm where it kind of seems like the build decided to make everything into cython objects ?
-
When a function has parameters for "limit" and "skip", make sure to double check those first when something seems broken. I switched them around so limit was 0, and I kept wondering why it returned 0 objects. It took me way too long before I figured that one out...
-
TypeScript + Vue3 is such a bullshit combination.
No wonder they dragged Vue3's launch for years. Coz it's garbage.
Out of beta and in supposed-prod, yet half the time the complex objects disappear when passed around. Pinia is bullshit-ia.
Unrelated TS components fuck up and console logs a "Ayye New Error we didn't know existed, here go to Vue Issue Helper and tell us about it so we get to make Vue3 worse than before" ffs.