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 - "dispose"
-
If you need to learn/teach object orientation, these are my approaches (I hate that classic "car" example):
1) Keep in mind games like Warcraft, Starcraft, Civilization, Age of Empires (yes, I am old school). They are a good example of having classes to use, instantiating objects (creatures) and putting them to work together. As in a real system.
2) Think of your program as an office that has a job to do, or a factory that has something to deliver. Classes are the roles/jobs and objects are the workers/employees. They don't need to be complex, but their purpose must be really (really, really) well defined. Just like in a real office / factory.
3) Even better (or crazier), see your classes and objects as real beings, digital creatures in a abstract world, and yourself as a kind of god, who creates species (define classes) with wisdom. Give life when it is the time for them to come into the world (instantiate object) and kill them when they are done with their mission (dispose an object). Give them behavior, logic, conditions to work with, situations where they take action, and when they don't. Make them kinda "smart". Build them able to make decisions and take actions based on conditions. Give them life. Think on your program as an ecossystem. There must be balance, connection, species must be well defined and creatures must work together to achieve a common objective. Don't just throw code and pray for it to run. Plan it.
-----
When I talk about my classes like they are real beings, and programs as mini-worlds, some people say I am crazy, some others say that's passion.
It is both! @__@3 -
Windows 10 'App Store' Stole My Money.
So I work a 40 hour work week, sometimes more, same as anyone, on my feet, all day.
I get home, buy a little $3.99 app. Won't install. Check it again won't install. I check some guides. Follow all the standard commands, my purchase won't install. Use the tools. won't install.
Naturally I sent off what I'm good at, some hate filled invective
For fucks sake. I'm exhausted, have insomnia and want to wind down. And here microsoft is killing 32bit libraries to dispose of competing services like steam (also fuck gabe in his fat asshole) but I digress.
And they expect us to use their services? Spend our hard earned *fucking money*..and spend half an hour on their dumpster fire fucking 'walled garden' with nothing to fucking show for it?
No refund button. No chat option. Just a fucking feedback hub. Look at it some time. JUST LOOK AT IT. The motherfucking *feedback* hub *frozeup* in the process of my feedback. Microsoft is a sewer of negligent business practices and incompetence.
So I've chosen now to aim two heavy ion cannons at them and warned them too. Two twitter accounts, one with almost 10k followers and another with 15k.
Should have just offered a manual download button microsoft.
My money would have been better spent on alcohol. Cheap alcohol. It's not like it's a lot of money and I don't buy a lot online, but it's the principle. You're fucking *payment* process worked *just fucking fine*.
Anyway can anyone calculate the monetary damage a cumulative quarter million views over the course of a month will do to the reputation of the windows store in dollar amounts?
I'm betting it's going to be a lot fucking more than three fucking ninety nine.
Don't worry microsoft, I'm gonna take it out of your sweet fucking hide.22 -
devRant gross truth time: the garbage can at my desk is used exclusively to dispose of boogers and chewed off fingernails.4
-
I'm on the fence about if the existence/mass production of shit like this is a good sign of a slightly more inclusive economy... or an early indicator of the apocalypse.
The circled part highly amused me.
It does give me s sense of peace and order due to it being sold by menards. They buy up bulk failures to launch and use their large audience to quickly dispose of them... so whoever had this stroke of 'genius', likely lost significant capital.73 -
Pun :
My C# developer friend Alfred getting a divorce because his feminist wife didn't like him treating her as "Object".
Now she's gonna "Dispose" him after "Using" him for her benefits.
😋3 -
So I've started a little project in Java that creates a db of all of my downloaded movie and video files. The process is very simple, but I've just started incorporating Machine Learning.
The process is quite simple: You load the files into the db, the program tries to determine the movie's name, year and quality from the filename (this is where the ML comes in - the program needs to get this and dispose of useless data) and then does an online search for the plot, genre and ratings to be added to the db.
Does anyone have any feature suggestions or ML tips? Got to have something to do during the holiday!1 -
I spent a whole day trying to debug why the backend would stop sending data after a while (-> it filled up its connection pool)
but after I turned pooling off, there were a number of dangling Client-Idle-Read DB connections
//not using Entity Framework in these N services, it's pure SQL and DB-AccessLayer here
Never happened before, looked up conf, looked up SO
Changed connectionClose to mandatory Dispose
Still didnt work.
long story short. Turns out in 1 of the services, the DataReader to POCO static method, was disposing/closing the READER and not the CONNECTION.
I sent it as tuple instead of 2 separate variables (reader, connection), and the Item1, Item2 got mixed up (:
Totally my fault, and imma avoid name-less tuples from now on like they a plague -.- thats my 2024-resolution6 -
.Dispose();
.Close();
.Dispose();
what an idiot! and his profile said he had 4 years of experience...
oh, yes, and that thing of not using arrays...
I have even more code from this guy, but one picture is enough -
When windows forms required me to dispose of a certain control derivative manually using a .dispose() call because dynamic control creation was causing a memory leak in dotnet, which instead of fixing, microsoft documented, vaguely.3
-
Build my own phone and support the Zerophone project by writing code.
Seriously what the fuck is going on with the development of major companies smartphones. Every year all there is are larger displays, better and more cameras, faster processors and some more 'AI' thrown into the mix.
What the heck am I supposed to do with a phone costing multiple hundreds of euros but locked down with an OS spying on you. The processing power available is hardly ever used because most people just use apps like Instagram, WhatsApp or other messaging services.
I get why larger screens are useful but at some point it gets ridiculous.
Better cameras are useful to some degree as well but there's a limit to it.
If you really want to get into photographing then please buy an actual camera.
Another aspect I'd of course like to talk about is privacy. It's hardly existent on IOS or Android smartphones with Google services. Of course one can install different ROMs like Lineage OS but if I already pay multiple hundreds for a device then I'd prefer it working for and not against me.
And dare you break a single part of your phone. You can't really repair it yourself anymore and one can't even change its battery. Most people either have it repaired or just buy a new one and throw it away. There is so much electronic waste, very difficult and expensive to dispose of, just buried in the ground somewhere.
Summing up: I don't really know where the development of smartphones is heading. A phone is a device you carry around with you almost everyday so I'd like it to be tailored to me and not spy on me.
I hope the Librem phone will be a success and other open source phone projects will gain more attention. I want a phone I can repair myself and tailor the software running on it to my needs. I'd like to write messages, listen to music, make calls, run a WiFi hot-spot on the phone and maybe play some tiny games on it once in a while.6 -
Disclaimer: This is all theoretical. Neither me nor my friend (with whom I discussed this) are stupid enough to even try to pursue this, but as an idea, i believe it might generate cool/new ideas/ways for handling secure communications across social groups.
Let's do some role play. Let's design a delivery app for drug dealers, think Seamless or Uber Eats, but for drugs. Not for big deliveries, like kilograms of coke, but smaller stuff. Maybe a few grams of it or something. The clients could rate dealers, and vide-versa. This would build a level of trust within the system. There would be no names, just anonymous reviews, ratings, and prices. Only the info you'd need to know.
The biggest (only?) problem we found (besides legality) was that, how would you prove that you're a client and not a snitch (or cop). This would have to somehow be handled both on signup, as well as when ordering (let's imagine that all who are clients are pure and won't ever snitch).
One of the ways we found to combat this was to have the app invite-only. This would, in theory, do away with the problem of having snitches signing up. However, what if the phone got stolen/breached by a snitch, and they also got full access to the account. One way we thought we could combat this would be with a "dispose number" or something similar. Basically, you call a number, or send a text, or message a Signal bot etc, which would lead to the account's instant termination, no traces of that user left. Hence, a dispose number.
The flow of the app would be as follows:
A client wants some amount of heroin. He opens the app, searches for a dealer, sends the him the desired amount, and in return gets back a price from the dealer. If both parties agree on the amount and price, the deal would start.
The app would then select a random time (taken from the client's selected timeframe and the dealer's "open" time) and a location (within a certain radius of both them, somewhere in between them both for convenience). If both of them accept the time and place, they'll have to meet up at said time and place.
The actual delivery could also be done using two dead drops - the client drops the money at one of them, the dealer drops the goods at the other one. Yes, this might be subject to abuse, but it wouldn't be that bad. I doubt that clients would make huge orders to unknown/badly rated dealers, as well as dealers accepting offers from badly rated clients. My idea is that they would start small, just so if they do lose their money/goods, the actual loss wouldn't be as big for them, but for the other party, having bad ratings would mean less clients willing to buy or dealers willing to sell.
A third way would be to use crypto, but the reason I left this as the last one is because it's not that wide-spread yet, at least not in local drug dealing. With this method, the client would initiate the order, the crypto would be sent to either the dealer or an escrow account, the dealer would then drop the goods at a random place and let the client know where to go to get them. After the client has gotten the goods, they could both review/rate the quality as well as the overall experience with that dealer, which would either make or break the dealer's upcoming deals. This would be pretty much like other DNM's, but on a local scale, making deliveries faster.
So far, this would seem like something that would work. Are there any ideas that might improve this? Anything that might make things more secure/anonymous?
My reason for this post is to spark a conversation about security and anonymity, not to endorse drugs or other illegal stuff.
Cheers!
PS. Really loving the new PC design of devRant14 -
Fuck HttpClient
Once upon a time there was WebClient and WebRequest, everything was simple and life back then was just 3 lines of code. But Microsoft came and decided to ruin everything with HttpClient. WHY IS HTTPCLIENT AN ASS TO DISPOSE? why cant you just close the connection and not fucking leave us with a TIME_WAIT. oh yes it doesn't support ftp and you'll recommend us to use a third party lib? fuck it if you want us to move to something better don't leave us with a half-assed HttpClient. but what about if you have 1000 proxies? oh boy I do love to initialize 1000 HttpClients with different HttpClientHandlers, want only to use HttpClient each request? goodluck filling your ports with TIME_WAIT seriously microsoft3 -
I'm halfway through season 3 of Halt and Catch Fire and I believe Cameron is my most hated movie character ever. That fcking manipulative useless piece of shit. Just fuck urself. Fcking garbage disposal wouldn't be able to dispose of ur bitch ass. I'm not sure if I can finish the season but it feels like she can't get any worse, wouldn't be surprised tho.
-
1) IList doesn't have an AddRange.
2) WPF bindings must be ObservableCollections
3) Comboxes using Event Notification on PropertyChange are originally developed by some dope at Microsoft who still doesn't comprehend Big-O
4) LINQ can only do so much...
It's Christmas. My gift from Santa is trying to get through an end of year crunch on a project that is made entirely out of hot sweaty year old garbage, and the garbage collector is a halfwit who comes seemingly only when they want to, regardless of when I call Dispose().
It's 12:26pm here. That means it's time for bourbon and a good bit of "F*** this, I'm done for the day."7 -
Spent the day figuring out how to maintain injected dependencies in scope when they're requested asynchronously later in the pipeline and then be able to clean it up later without having any lifecycle hooks to use.
Seriously considered switching DI frameworks before I just added an event when it's OK to dispose of the scope and I think it's finally working (without the memory leaks it had before).
Who else has to try something every possible way before you can be satisfied? -
That moment when you are told the code you wrote two years ago and has been working fine until there were "no changes" made...and it turns out some stupid extension tools said to dispose of an object before it has a chance to execute
-
Le débouchage est un procédé utilisé pour Debouchage Charleroi les drains et les canalisations. Ce processus est généralement effectué par un professionnel qui dispose des outils et de l'équipement appropriés pour effectuer le travail. Il existe de nombreux types de services de débouchage disponibles, mais ils ne sont pas tous créés égaux. Certaines entreprises peuvent offrir un prix moins cher, mais elles peuvent ne pas avoir l'expérience ou l'équipement approprié pour faire le travail correctement. Efficient Debouchage Charleroi Services est une entreprise qui propose une grande variété de services de débouchage. Ils sont en affaires depuis plus de 20 ans et ont l'expérience et l'équipement nécessaires pour bien faire le travail. Ils offrent une variété de services, y compris le nettoyage des canalisations, le nettoyage des canalisations et le nettoyage des fosses septiques. Ils offrent également une garantie de satisfaction satisfait ou remboursé afin que vous puissiez être sûr que vous serez satisfait des résultats.
my-dep.be/debouchage-charleroi/