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 - "collections"
-
devDuck holiday promotion! For every duck you order from now until the end of the year, we'll include a free adorable Santa hat to help keep your debugging in the holiday spirit! Order now from our swag store: https://swag.devrant.com/collection...43
-
PHP sucks balls,
It takes forever to do anything, it is so messy it feels like walking through a massive pile of shit!
Ok good I have your attention and that ++ 😇
But no this is not that kind of rant, quite the opposite.
In 70 lines of php shit as some people would call it, I am currently scrapping GitHub pages with ebook collections and with some minor regex pulling PDFs out and saving them to file.29 -
When you start a new job as a Senior Developer, and start asking questions about the code, and you have these collections of conversations with other front-end people:
Exhibit 1:
Me: Ahh so I see the filtering and pagination is all done with Javascript in the front end...
Random dev: No, it's done with Angular.
Exhibit 2:
Me: I think we should add frontend pagination to this page. There will be too many elements on it if you're a customer with 2000 servers.
Random dev: Don't bother, there's no pagination in the API call... So that will not gain any performance.
Me: But it wouldn't take long to implement and it would improve the user experience, why would you want to show ALL the elements, when you have an option not to... Also, it WILL be a major performance hit, especially on mobile.
Random dev: People will use search anyway.
😥🔪
Also, there are no coding standards, every file looks different, and my opinion is being disregarded in everything, and I thought my last job was bad...
Seriously how are some people hired as front-enders?
Since I just took this job, I feel obligated to stay a couple of months... But hey, don't cry for me, I might have more rants for you. 😂
Sorry for the long rant, here's cake: 🍰5 -
As a German developer living in Germany, I am used to write my code completely in English. In all of my former companies that was also the norm. In one company, we even talked completely in English with each other to a point where even if only German people where in a room, they would default to English at one point in a conversation because it became second nature to us.
(That company was very international and we had a lot of people from all over the world working there.)
Now, I work at a new German company that focuses on the German market. And for some reason I failed to ask them:
Do you write your code in English?
Because that's the norm, isn't it!? I just assumed it to be the case.
Nope! This time it is a mess of German and English term intermixing in glorious abysmal ways I never thought possible.
Sometimes we translate terms, sometimes we don't. So you have to wrap your mind around collections of words that COULD mean the same thing unless they don't. Best case, you have two words for the same thing, but I've seen up to five words (or abbreviations) to describe one business entity. Madness.
And don't get me started on the plurals. In English, it's almost exclusively: add an `s`.
In German, the singular and plural can be the same (e.g. all nouns ending with `-er`) so tough luck determining if you are on an object or an array of objects. (Weak typing language in use does not help either but that's an entirely different rant.)25 -
Project Cortana: Day 1
I have seen a lot of people switching to Linux or other services to get away from all the data collections. It makes a lot of sense as no one would want their data to be sold without their consent.
But I am going to do something different. My aim is to integrate with Microsoft apps as much as possible and review the experience. So here is what I have done so far:
* Use Cortana in desktop and mobile (Android)
* Use Microsoft launcher in mobile
* Outlook as primary email provider (I was already using them as my default provider)
* Use Microsoft To-Do and calendar to keep track of things
* Use OneDrive to store all my files (I am moving them from Google Drive)
* Use the default Mail app on the Windows 10
* Use Onenote (I was using Evernote before)
* Use Edge on desktop and Mobile
* Use Skype instead of Hangouts
It's day one but I think I have already found it quite useful. For example:
* Adding reminder is much easier. I get them on both desktop and mobile which is nice.
* Mail app has been really useful. Especially the focused inbox really helps to get rid of the clutters. Also, I can immediately add a mail to the calendar (like Inbox by Google) which is really helpful.
* One of the features of edge that I have found really useful is that you can send web pages from mobile to desktop in one tap. That is extremely useful.
So far I am loving it.
Also, I tried to make sure that I am not sharing my data with third-party apps as I have turned off "relevant ads" feature.43 -
Clever that it is printed upside down, so you can look down and actually read it.
https://store.xkcd.com/collections/...9 -
former boss wrote three cyber-defense books. had his "collections" team sending plaintext passwords to high-side clients over unsecured email4
-
TLDR - you shouldn't expect common sense from idiots who have access to databases.
I joined a startup recently. I know startups are not known for their stable architecture, but this was next level stuff.
There is one prod mongodb server.
The db has 300 collections.
200 of those 300 collections are backups/test collections.
25 collections are used to store LOGS!! They decided to store millions of logs in a nosql db because setting up a mysql server requires effort, why do that when you've already set up mongodb. Lol 😂
Each field is indexed separately in the log.
1 collection is of 2 tb and has more than 1 billion records.
Out of the 1 billion records, 1 million records are required, the rest are obsolete. Each field has an index. Apparently the asshole DBA never knew there's something called capped collection or partial indexes.
Trying to get approval to clean up the db since 3 months, but fucking bureaucracy. Extremely high server costs plus every week the db goes down since some idiot runs a query on this mammoth collection. There's one single set of credentials for everything. Everyone from applications to interns use the same creds.
And the asshole DBA left, making me in charge of handling this shit now. I am trying to fix this but am stuck to get approval from business management. Devs like these make me feel sad that they have zero respect for their work and inability to listen to people trying to improve the system.
Going to leave this place really soon. No point in working somewhere where you are expected to show up for 8 hours, irrespective of whether you even switch on your laptop.
Wish me luck folks.3 -
The manager and selfperceived omnipotent cult leader was the worst kind of businessman. Slimey and trecherous, zero sense of ethics, but felt holier than the pope because he "helped" his weakling herd of piteous employees.
These employees were smart kids, most of them in their late teens. All of them legally disabled. There was this kid who gobbled up ritalin like candy, a boy who had received his measles shots and turned socially awkward (/s), a chubby girl who could name all the hex colors of her chocolate stained shirt... you know, what we call skilled developers in the industry.
Fiftyfive of them.
They were awesome, awkward highschool dropouts, like I had been a decade earlier. They worked 50h a week. They had great humor, were passionate, devoured information about new technologies, and they built custom websites from scratch in no time. I had to lead this flock, and felt honored to work with them.
Then things started to smell funny.
I discovered all 55 of their workstations ran pirated software, from Windows to Adobe CS. I'm not without sin in that regard, but as a company it's just plain stupid.
Clients were treated like shit. I mean, we all feel like punching a client in the face sometimes, but I'm taking about unjustified debt collections paired with death threats.
Then I found out these kids were often disappearing for a few months, only to return months later.
I started digging, and discovered they were all working reintegration internships (because they were on below minimum wage disability payments), at almost zero cost to my employer.
After 6 months, my boss gave them a negative recommendation, they were all too "sick" to function in normal jobs.
Then they were rotated to a shadow company, doing the same work for another 6 months, and so on to a third company.
He broke these kids, talked them down, made them feel worthless. He threatened the ones who understood what was happening.
I ended up bringing the company down, with the CEO and two government officials jailed for fraud and corruption.
Some employees were quite mad about it, at least at first — I was the shepherd who abandoned his sheep. Luckily, most found better paid positions in no time.
Truly one of the most fucked up and difficult situations I've been in.6 -
fucking piece of garbage postman!
WHY THE HELL do you auto-update yourself when i explicitly DISABLED updates?
why the hell is it just a "minor" update to switch to a version that FORCES you to have an account, even if all you do is use offline features?
and why is there no option to disable syncing your data to their server, even if it's not needed at all? YALL EVER HEARD OF A THING CALLED PRIVACY?
and why the fucking fuck of all fucked fucks DO YOU DELETE MY PREVIOUS OFFLINE DATA SO I CAN'T EVEN CONTINUE WORKING BY INSTALLING AN OLDER VERSION?!?
some dumb-piece-of-garbage-waste-of-oxygen managers decision to screw their userbase cost me several HOURS(!) of work already and probably will cost some more due to the lost collections.10 -
Why is it that pretty much zero package & framework maintainers understand semantic versioning?
1. If you do a complete rewrite of your package, but the resulting API is identical, you don't need to bump to the next major version. As a user, I'm thankful for your increased performance or cleaner internal code, but it doesn't really affect my update process.
2. If your package required some-framework 6.0.0, and now ALSO supports some-framework 7.0.0 but is still compatible with 6.0.0, you don't need to bump to the next major version. As a user, I can now upgrade the framework, and know that the package will keep working, but otherwise it doesn't really affect me.
3. Following your versioning along with the framework/language version is super annoying, especially if your library really doesn't need to differentiate between framework versions because it's not actually utilizing new framework functionality.
4. On the other hand, if you stop supporting a certain language, framework or shared library version, or change the public methods, exceptions, fields, etc, you MUST bump to a new major version.
Yet everyone gets this wrong.
For example, many of Laravel's underlying subpackages (for collections, filesystem, database, config, http, mail, etc) do not change their code in a breaking way, or do not even change at all between major framework versions.
Yet they follow along with the major framework version.
Now if someone makes a library "laravel-elasticsearch" which uses the support libraries and collections from laravel, they need to update their package to move along with the versions as well, and often they choose to number their library along with the framework in turn.
This means that to update the framework, you also need to update over 9000 dependencies.
FOR NO FUCKING REASON. THE ONLY CHANGE IN THOSE FUCKING DEPENDENCIES IS TO UPDATE COMPOSER.JSON TO BE COMPATIBLE WITH THE FUCKING FRAMEWORK.
Meanwhile, Laravel itself breaks repeatedly on minor/patch version updates, because breaking changes slip through their review process.
Ugh.3 -
I haven't posted here in ages, but I thought I would come on and gush to perhaps the only community that might have people in it who would care: Insomnia allows syncing with git repos to backup your collections! For me, that means that I now have a bunch of repos in my forgejo instance for insomnia collections.
Even if I was a subscriber, I would still much rather sync between desktops this way.
Anyway, I hope everybody's doing well.2 -
C#: the only language where you have 0 based arrays and 1 based collections, just to mess with you... Damn you M$!
(spent hours trying to understand why collection[0] was raising an out of range exception...)3 -
I think I might change my middle name to "I told you so"
Couple of weeks ago I proposed integrating a daily process job into an existing WPF application (details of what+why would be too long to explain) and the manager suggested I make the changes
Me: "I can do it, but Jay has the most experience with that application. I don't have his WPF skills"
Mgr: "How hard can WPF be? If it uses the MVVM pattern, it should be a snap."
Me: "Its nearly an 8 year old WPF project with several chefs in that kitchen. I pretty sure I could figure it out, but that is a difference between 2 weeks and 2 days. Integration is pretty straight forward, Jay could probably do it in a day."
DevA: "WPF is easy. MVVM makes it even easier. I worked on the shipping app."
Me: "That's was a brand new, single page app, but yea, it should be easy."
DevB: "WPF has been around a long time and the tools have really matured. I don't understand what is so difficult."
Me: "I didn't say anything would be difficult, I know with that application, there is going to be complexity we need to figure out."
DevB: "It uses the MVVM, so all we need is the user control, a view model, controller, and its done."
DevA: "Sounds easy to me."
Mgr: "If you need more time to work on the vendor project, I'll have DevB work on the integration."
<yesterday>
Me: "How is the integration going?"
DevB: "This app is a mess. I have no idea how they got the control collections to work. If I hard-code everything, I can get it to work. This dynamic stuff is so confusing. Then there is the styling. Its uses dark mode, but no matter what I do, my controls show up in light mode."
Me: "The app uses Prism, so the control configuration is in, or around, the startup code."
DevB: "That makes sense. Will it fix the styling too?"
Me: "I have no idea. When I looked at it, some controls loaded the styles from the main resource, other's have it hard-coded. Different chefs in the kitchen, I guess. How far have you got?"
DevB: "I've created invoice button. That is as far as I got"
Me: "I'm finished with the vendor project and I'll be wrapping up the documentation today. I can try to help next week."
DevB: "Thanks. I think we might have to get Jay to help if we can't figure this out."
Me: "Good idea"
Two weeks and only a button. A button? I miss Delphi.3 -
Idiots. Just... Fucking Idiots.
Junior Frontend dev got a feature to implement. Decided to add a field to a set of mongo collections. I'm the responsible adult for those collections. Talked to the junior - told it, "don't do that, you will lose the data you are adding later". Junior says "will not happen", and goes on to try and prove It is "Right". Problem? Junior is an Idiot. did not trigger the data loss scenario. So... Junior got his TL to talk to the RND manager. And those Idiots Decided that the implementation will go forward as is.
Data loss will happen. QA will not find it. Only the client will experience the data loss, and complain....4 -
Regus sent me to collections.
Jist: if you ever think about renting an office from Regus, for the love of your bank account and your credit, just don't. Go into the kitchen and pan-fry your face instead. it'll be better.
Moral: get it in writing. What is "it"? Fucking everything.
------
I needed someplace quiet away from my children to work, so I rented an office from Regus. They said they had a minimum 6-month contract, which is fine, but at the time I was pretty sure I would be moving within three to five. They said they understood and offered the quivalent of a month-to-month plan: I could cancel my contract whenever I wanted, given a few weeks' notice, and that would be that. It wasn't in writing, but both the accounts person and the regional manager were there offering it to me, and they seemed cool. Awesome! I agreed, signed the contract, and paid a hefty damage deposit.
Long story short, I ended up hating the office, and chose to bear the distractions at home instead. Seeing how much I disliked it, the accounts person I talked to originally called me and offered to cancel my contract. I agreed, and she walked me through the steps to cancel it and request my deposit back. Done. I aske her if that was it; no more payments, no more contract. "No more," she said. "You're done." I liked the sound of that. Done and done.
The next day, I check my bank account; no deposit.
Two weeks later, still no deposit.
A month later, still no deposit.
They did say it could take up to three fucking months or something, so whatever. I waited.
Another month later, and instead of my refunded deposit, I get an overdue invoice notice? Seriously?
Apparently they never cancelled my contract, don't remember offering me the month-to-month agreement, nor does the very chick I talked to remember telling me over the phone that everything was paid up and done. Apparently my contract wasn't even for six months like they originally promised, but indefinite? despite all of this? and despite the two of us fucking cancelling it? together?
But no, the legal agreement is binding and explicitly states that they are fucking assholes and due their pound of cash.
So fuck that and fuck them.
And in response, they sent me to collections.
Huge fucking surprise.
and now collections is calling me saying I owe $1900, which works out to a lot more than the couple months it's been since I cancelled that crap, AND.
AND IT'S LESS THAN THE FUCKING DEPOSIT REGUS NEVER RETURNED!
SO NOT ONLY DID THEY NEVER CANCEL MY CONTRACT, THEY CHANGED ITS TERMS (or lied up-front) AND DECIDED TO POCKET THE DEPOSIT INSTEAD OF APPLY IT TO MY FUCKING IMAGINARY BALANCE!
FUCK YOU SHADY MOTHERFUCKERS!10 -
Constructors, generics, collections, package versioning, immutability, syntactic sugar, option types? Meh.
Unused imports? NEVER!
#golang -
This might not resonate with many ranters here... but FUCK Taylor Otwell & Graham Campbell.
Like, not on a personal level. Maybe they're great to drink a beer with. But as framework devs... fuck everything about them.
Laravel seems so nice, it takes away many annoyances of developing in PHP. Collections are the array object you've always needed. The route bindings, middlewares, request validation objects, it's all sweet.
But eventually your company serves a few million customers, you run into specific performance problems or missing features on a deeper level. You open the issue tracker... and see a few hundred issues about the problems you are encountering, they already exist.
Some just have a short paragraph with a request for a feature, some complete PRs with tests in the style of the framework. All of them closed.
Reasons?
"We don't think anyone will ever need this"
"This seems complicated, you can just do <super non-DRY hacky code>"
FUCK YOU WITH YOUR TODO APP SNIPPETS AND USER-POST-ARTICLE EXAMPLES. I'M NOT BUILDING THE NEXT WORDPRESS. I'M DEALING WITH THE REALITY OF GRAPH DATABASE CLUSTERS, COMPLEX AUDITING LOGS AND A GAZILLION QUERIES PER SECOND.
Sigh... the problem with all these "simple" and "elegant" languages & frameworks is that they don't fucking scale.
Not because the language, server or framework intrinsically can't do it, but because the maintainers are stuck thinking in terms of their retarded non-realistic example apps.
I think I'll go back to my cave and write some Haskell or Rust to calm down.2 -
Some time ago I was working in a freelance gig. I was the backend developer and the front end guy and I had some differences in our postman collections, so I asked him to email me his exported json collection.
When he emailed me, it was really funny to see his signature, which included all the courses he had and his degrees and whatnot.
like dude, "I didn't wanted your CV, I just wanted the collection"
PS: I hope you get the idea from the image, even if it is in spanishjoke/meme long time no posting i got the tags wrong large email signature story cv ok i don't want to know that7 -
Today I finally experienced the power of something I learned in university: propositional and predicate logic.
Many developers I know think that such education is useless. Well, today I have proven that it is very useful. On a day to day basis, working on banking software, complexity in purely logic is very low. However, we have a screen that must show or hide elements based on some input values and conditions associated with certain elements. How hard can that be, right? Well, there are many variables to take into account and as such it's absolutely not trivial.
This screen didn't work properly and maintaining the code is hard as there is a lot of logic to show/hide, enable/disable things and so on. After quite some time and attempts by fellow developers, I decided to refactor the whole thing. I'm responsible for the quality of the software and it was quite degrading, so I had to do something.
In order to get things working properly, I defined collections of constants (ui elements) and predicates. Then, I defined for which element what predicates must be true, in order to hide/show, disable/enable etc. I then translated these predicates into code. And guess what? It works! Of course it works. It's logic. But I'm very pleased I finally could actually use some of all the math I studied!5 -
The more i work dev stuff in web3 the more i realize how cancerous this space is. Shits terrible over here. Not only is it extremely difficult to program but the biggest.... Idk whats the best word to use, irritating? Annoying? Stressing? Degenerate? Biggest shit thats happening are scams scams and fucking scams. Honestly you never know who's legit and who's about to scam
A 16 year old kid rug pulled 6 nft collections and stole over 10 million dollars so far. He's even arguing on twitter publicly claiming he's the Batman
People are robbing everyone for millions of dollars
You've probably heard about Luna ponzi scheme that collapsed and the founder stole BILLIONS of dollars
And the worst part about all of this:
THERE ARE NO CONSEQUENCES! WTF?
So why the fuck should i work a job and try to be legit if i can scam degenerates for millions of dollars because there are no consequences??3 -
Ive been working on pseudo-Java (ie some 3rd company's UNDOCUMENTED programming language) that they parse into Java in their backend
It doesnt even support if-else (only ifs and elses) or a boolean combination of False and OR together lmao
mainly a GRPC middleware-language
Given its lack of features (arrays/collections) or documentation, I just had to implement a flag-array using a 0-1 string
Im throwing exceptions unless combined strings equal Lengths and is only 1s
living like in 80s-90s 💀7 -
Teach things properly, most teachers are confused and they start throwing keywords at even more confused students who then have no clue what they are doing and they then ask me to do their work for them showing me their unindented(well... kinda, they all seem to fight with the IDE, which is trying to properly indent their mess, for some reason), teachers think that Turbo Pascal is the way of life and that it is used everywhere(one teacher tried to tell me that Pascal is used in the stock market and in modern operating systems - U wot m8?! how high are you right now) and they don't teach user input sanitization and type checking, they stare at you like you are the fucking satan when you dare to use objects, collections and abstraction because they are scared to death of that stuff... and then they think 60 minutes is enough to teach HTML, CSS, JS and PHP in one go(which they even don't know properly - the teacher that made and maintains the school's website is probably stuck in 1998 judging by the design and functionality of the website and his clothes) and they then send absolutely clueless students to compete in a web design competition (and then they get angry at the judges for giving the students 0 points)6
-
Hey guys and girls, quick question.
Im currently writing my own collection-framework in Go.
It has a Collection-Interface, that looks like this:
Clear()
Size() int
ToSlice() []interface{}
Add(...interface{}) error
Remove(...interface{}) error
Contains(...interface{}) (bool, error)
The library should also contains stuff like stacks and queues, so datastructures, that dont fit that interface perfectly.
So should i write a weird implementation of the interface for them, like Remove for stacks (high pitched internal screaming), or should i just say fuck it, and dont implement the Collection-Interface for these specific types ?3 -
Asked Google about joining two collections in backbonejs.
Google autocorrect changed to Backbone Joint Pain.
sigh!!1 -
How can Javascript, one of the MOST WIDELY used and MATURE languages with A MILLION CANCEROUS FRAMEWORKS, NOT have a basic collections class? Are data structures not important in Javascript?
I've been struggling all night trying to get Sets working - surprise, they're utterly useless in Javascript cause you can't define the set comparator.
I just lost it when I found out THERE ISN'T EVEN A QUEUE. WT-ACTUAL-F15 -
Can anyone recommend good resources for learning how to design NoSQL (document) data models?
I'm interested in stuff that talks about how to make the choices about distributing data across collections, etc.
When to have a single collection, when to split data across different collections, when to duplication data, etc,6 -
In C# should I be using collections over normal arrays?
What’s the difference and what are the benefits of using collections?13 -
My boss is being a stupid cunt. To give you a background we were facing issues with our Collections system. First week December 2019, I and a colleague of mine came up with a new efficient collections architecture. My colleague and I started to Code and create automation scripts mid December and completed it in First week of Jan 2020. This PoC version was supposed to be just between the Dev team(App Dev and Back end, also one from the Ops side to verify the data). I did not receive any feedback on the actual collections system and the data integrity but during this time all they’ve done is take meetings with no real outcome. I raised this and the only email I got is data is looking fine when I know it is not.Now in First week of Feb, he is stressing us to go ahead and deploy the architecture in Production and we have not done any Code Review, Static Code analysis, any real tests on Code and deployment scripts. Have not discussed any metrics for our dashboard and alerting. I have no idea how to handle this cunt. I have even asked for resources to atleast productionalize the code and move ahead the deployment and still no out come. I’ll go in a meeting with him in an hour, I will be very blunt and tell him that whatever he is doing is a foolish way and maybe resign in couple of weeks6
-
so if i get this correctly :
1. mongodb( community server) is going to create some files in my system which will be called "databases/collections/document bullshit via its own special process called mongod (similar to mysql , but ok)
2. my python flask app is going to connect to it via its official driver pymongo (which could be used directly)
3. mongoengine is a library (more of a wrapper on pymongo) providing "easy ways for connecting mongodb via pymongo" (which again could be used directly)
4. flask-mongoengine is library (more of a wrapper on mongoengine providing "easy ways for connecting mongodb via mongoengine via pymongo" (which again could be used directly)
5. flask-pymongo is some another bullshit library/wrapper that took away 6hours of mine which again is "A FUCKING WRAPPER PROVIDING EASY WAYS FOR CONNECTING TO MONGODB VIA PYMONGO"
seriously, fuck web development. Why can't the original driver (i.e pymongo from mongodb devs) could have simpler wrappers? and why does my fucking tutorial instructor had to use the most fucking rarely used flask-mongoengine (which i accidently read as flask-pymongo and got f**ked) to teach newbies? fucking day wasted trying to understand this crap.
I don't like monnopolies, but its somewhat good that the mobile environment is still in the hands of nononsense players like google and oracle(java) . atleast we don't have people releasing wrapper over wrapper over wrapper and then fighting about which wrapper is better to use.
Like , even when devs started cmplaining that android dbs are too difficult to understand, google themselves created an actively supported wrapper that shutted down the fight over which wrapper to use(sqldelight, realm,sql bright etc)5 -
So, for the last year or so, we've been playing with a natural language A.I.
The goal was to predict port, truck and rail service disruption due to social unrest.
The trick here is that our AI would "read between the lines" of today's news articles and spit out keywords that were likely to appear in near future articles, thus giving us an early warning before some union or army start blockading roads.
It... did not work as intended. But some very weird results came out.
Apparently, we made a robotic "kid that screams that the emperor has no clothes", yielding unlikely (but somewhat expected) keywords when fed collections of articles.
We gave it marketing content about our company. It replied "high suicide rate".10 -
Perhaps as a tip for the junior devs out there, here's what I learned about programming skills on the job:
You know those heavy classes back in college that taught you all about Data Structures? Some devs may argue that you just need to know how to code and you don't need to know fancy Data Structures or Big o notation theory, but in the real world we use them all the time, especially for important projects.
All those principles about Sets, (Linked) lists, map, filter, reduce, union, intersection, symmetric difference, Big O Notation... They matter and are used to solve problems. I used to think I could just coast by without being versed in them.. Soon, mathematics and Big o notation came back to bite me.
Three example projects I worked in where this mattered:
- Massive data collection and processing in legacy Java (clients want their data fast, so better think about the performance implications of CRUD into Collections)
- ReactJS (oh yes, maps and filters are used a lot...)
- Massive data collection in C# where data manipulation results are crucial (union, intersection, symmetric difference,...)
Overall: speed and quality mattered (better know your Big o notation or use a cheat sheet, though I prefer the first)
Yes, the approach can be optimized here, but often we're tied to client constraints, with some room if we're lucky.
I'm glad I learned this lesson. I would rather have skills in my head and in memory than having to look up things and try to understand them all the time.5 -
MongoDB database with really relational data. One main collection that had refs to four other collections, all of those references necessary to populate data for a page view. Complicated aggregate to populate all the necessary data and then filter based on criteria selected by the user. And then the client decides that he wants the information to be sortable by column. Some of those columns are fields on the main model, no problem. Others are fields on the refs, which is more of a problem. Especially given that these refs aren’t one single object. They’re arrays of objects.
The revelation was that I could just write an aggregate function to flat map the main collection, returning only the fields necessary for the search, and output it to a new collection and instead use that new collection for displaying and filtering/sorting search results.
But you can’t run the aggregate all the time, you surely say. If anything changes in the main collection, it won’t be reflected in the search results!
Mongoose post(‘findOneAndUpdate’) hooks, my friends. Mongoose post(‘findOneAndUpdate’) hooks.
Never been so happy to have a thing working properly in my life.2 -
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
-
Just realized that it’s been a long time since I had to deal with collections that contain values of different types and that ugly type checks that come with it when you need to do something with the values.
Sum types are really a blessing. -
For current project, client provided us with ui design and postman collections and expects us to build application based on that. I'm currently onsite, working from client's offices, trying to communicate what each api does and what they expect. And they're fucking avoiding me. Roll eyes if meeting lasts more than a fuckin hour. Laugh when we point out inconsistencies in tgeir design.
The fug? You're paying us to do the job. We don't fucking care, it won't be finished till you provide enough information.2 -
#Suphle Rant 9: a tsunami on authenticators
I was approaching the finish line, slowly but surely. I had a rare ecstatic day after finding a long forgotten netlify app where I'd linked docs deployment to the repository. I didn't realise it was weighing down on me, the thought of how to do that. I just corrected some deprecated settings and saw the 93% finished work online. Everything suddenly made me happier that day
With half an appendix chapter to go, I decided to review an important class I stole from my old company for clues when I need to illustrate something involved using a semblance of a real world example (in the appendix, not abstract foo-bar passable for the docs)
It turns out, I hadn't implemented a functionality for restricting access to resources to only verified accounts. It just hasn't been required in the scheme of things. No matter, should be a piece of cake. I create a new middleware and it's done before I get to 50 lines. Then I try to update the documentation but to my surprise, user verification status turns out to be a subset of authentication locking. Instead of duplicating bindings for both authentication and verification, dev might as well use one middleware that checks for both and throws exceptions where appropriate.
BUT!
These aspects of the framework aren't middleware, at all. Call it poor design but I didn't envisage a situation where the indicators (authentication, path based authorisation and a 3rd one I don't recall), would perform behaviour deviating from the default. They were directly connected to their handlers and executed after within the final middleware. So there's no way to replace that default authentication scheme with one that additionally checks for verification status.
Whew
You aren't going to believe this. It may seem like I'm not serious and will never finish. I shut my system down for that day, even unsure how those indicators now have to refactored to work as middleware, their binding and detachment, considering route collections are composed down a trie
I'm mysteriously stronger the following day, draw up designs, draft a bunch of notes, roll my sleeves, and the tsunami began. Was surprisingly able to get most of previous middleware tests passing again before bed, with the exception of reshuffled classes. So I guess we can be optimistic that those other indicators won't cause more suffering or take us additional days off course2 -
Top 12 C# Programming Tips & Tricks
Programming can be described as the process which leads a computing problem from its original formulation, to an executable computer program. This process involves activities such as developing understanding, analysis, generating algorithms, verification of essentials of algorithms - including their accuracy and resources utilization - and coding of algorithms in the proposed programming language. The source code can be written in one or more programming languages. The purpose of programming is to find a series of instructions that can automate solving of specific problems, or performing a particular task. Programming needs competence in various subjects including formal logic, understanding the application, and specialized algorithms.
1. Write Unit Test for Non-Public Methods
Many developers do not write unit test methods for non-public assemblies. This is because they are invisible to the test project. C# enables one to enhance visibility between the assembly internals and other assemblies. The trick is to include //Make the internals visible to the test assembly [assembly: InternalsVisibleTo("MyTestAssembly")] in the AssemblyInfo.cs file.
2. Tuples
Many developers build a POCO class in order to return multiple values from a method. Tuples are initiated in .NET Framework 4.0.
3. Do not bother with Temporary Collections, Use Yield instead
A temporary list that holds salvaged and returned items may be created when developers want to pick items from a collection.
In order to prevent the temporary collection from being used, developers can use yield. Yield gives out results according to the result set enumeration.
Developers also have the option of using LINQ.
4. Making a retirement announcement
Developers who own re-distributable components and probably want to detract a method in the near future, can embellish it with the outdated feature to connect it with the clients
[Obsolete("This method will be deprecated soon. You could use XYZ alternatively.")]
Upon compilation, a client gets a warning upon with the message. To fail a client build that is using the detracted method, pass the additional Boolean parameter as True.
[Obsolete("This method is deprecated. You could use XYZ alternatively.", true)]
5. Deferred Execution While Writing LINQ Queries
When a LINQ query is written in .NET, it can only perform the query when the LINQ result is approached. The occurrence of LINQ is known as deferred execution. Developers should understand that in every result set approach, the query gets executed over and over. In order to prevent a repetition of the execution, change the LINQ result to List after execution. Below is an example
public void MyComponentLegacyMethod(List<int> masterCollection)
6. Explicit keyword conversions for business entities
Utilize the explicit keyword to describe the alteration of one business entity to another. The alteration method is conjured once the alteration is applied in code
7. Absorbing the Exact Stack Trace
In the catch block of a C# program, if an exception is thrown as shown below and probably a fault has occurred in the method ConnectDatabase, the thrown exception stack trace only indicates the fault has happened in the method RunDataOperation
8. Enum Flags Attribute
Using flags attribute to decorate the enum in C# enables it as bit fields. This enables developers to collect the enum values. One can use the following C# code.
he output for this code will be “BlackMamba, CottonMouth, Wiper”. When the flags attribute is removed, the output will remain 14.
9. Implementing the Base Type for a Generic Type
When developers want to enforce the generic type provided in a generic class such that it will be able to inherit from a particular interface
10. Using Property as IEnumerable doesn’t make it Read-only
When an IEnumerable property gets exposed in a created class
This code modifies the list and gives it a new name. In order to avoid this, add AsReadOnly as opposed to AsEnumerable.
11. Data Type Conversion
More often than not, developers have to alter data types for different reasons. For example, converting a set value decimal variable to an int or Integer
Source: https://freelancer.com/community/...2 -
This fucking ci/cd test keeps deleting my dB collections and I can't see what the fuck is going on. Circleci is of the devil and I won't stop fucking using it. I must crack this shit😡2
-
How good is the world of java advanced for a career these days? I learned java basics (collections,OOP, syntaxes, threads, a little bit of spring,etc) aka core java in college and then went straight to Android dev.
I am thinking of learning about the contents of java ee and me or whatever "advanced" java is. How tough is it? What is the career in it? How good is the possibility of getting a fresher job in it?2 -
The objective c stdlib is pretty cool, it's what backs the swift stdlib on mac. The collection classes dynamically switch backend depending on size and expected performance characteristics. EG a set of 3 items is faster to linearly search a vector, so it'll switch that out.
https://objc.io/issues/...
I'm not a mac fan but that's some truly artful engineering.
(reposting comment as rant coz I think it's cool)3 -
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 could write a fucking dissertation on why snek is objectively a piece of shit, together with all your favorite dumbass collections of syntactic diarrhea full of needless operators and toothless fucking conventions that make no sense in retrospect.
By that I mean to say among all of it's real world uses the foremost is screwing yourself, which is analogous to utilizing the fine hands of a classically trained violinist for virtuous masturbation. And you cannot fix it, you can only Keep It Solemnly Sucking.
Now I'm not saying that if they were humans their lot in life would be to get down on their knees and passionately blow me until my eyes pop out. All I'm saying is their lot in life IS to get DOWN and passionately BLOW me until my eyes pop out, to which the general scientific consensus is indeed yes, it is, and they absolutely should.
But back to commanding the demons trapped inside the sillicon and all the existing ways to to do so being terrible half-assed abortions that serve as a perfect encapsulation and prime example of mankind's greatest shame and failures. If I had to volcanically ejaculate for each time I heard a thorough and perfectly valid critique of insert flavor of fucking stupid, I'd be long-rotting dead from dehydration.
You think that's funny? A man just died creaming in his pants and we are all wiser for it, show some respect. Some people simply do not understand the value of humility, and I will be *proud* to anally humble them for it, free of charge.
Anytime, I swear, ANYTIME that I come back to a language I fucking hate and I'm immediately reminded of why I do everything in my power to avoid it, I invariably come out with the feeling that it wasn't quite as bad as the last time.
THAT is how I measure my progress: still swimming in a sea of deeply decolored and fermenting alien reptile excretion -- but I'm a much better swimmer. This isn't so bad, I may even ignore the burning desire to kill myself next time.
But I'm so blinded by your plump fucking tits that I can't even remember what was my point, I may have just delivered the verbal equivalent of complete mental castration. Again.15 -
"What tools are needed for eyelash extensions? (eyelash glue, eyelash extension tweezers, etc.)
When applying eyelash extensions, just as important as the extension process itself is choosing the right tools. They not only make the master’s work easier, but also affect the quality and durability of the eyelashes. In this article we will look at what tools are needed for eyelash extensions.
The first and, of course, the most important tool for eyelash extensions is eyelash glue. This glue provides reliable and long-lasting adhesion between natural and artificial eyelashes. It should be hypoallergenic, safe for the skin around the eyes and water resistant. Only correctly selected glue can guarantee safety and beautiful extension results. Therefore, it is important to choose high-quality eyelash glue https://stacylash.com/collections/... that meets all requirements.
The second necessary tool is eyelash extension tweezers. They allow the technician to conveniently and accurately separate natural eyelashes, which facilitates the process of applying and fixing artificial eyelashes. It is important that the tweezers are of high quality, with narrow and sharp tips to ensure precise capture and separation of eyelashes.
The third important tool is tweezers. Tweezers allow the technician to conveniently and accurately place and fix artificial eyelashes on natural ones. It is important that the tweezers have good grip and grip accuracy to ensure precision and accuracy of the extension process.
The fourth necessary tool is a special eyelash brush. It is used to comb eyelashes before the procedure and to remove excess glue after extensions. The brush should be soft, but at the same time securely hold the eyelashes.
The fifth tool is special overhead eye pads. They are used to protect the skin around the eyes and lower eyelashes during the eyelash extension procedure.
So, for successful eyelash extensions you need high-quality eyelash glue, tweezers, tweezers, an eyelash brush and false eye pads. The correct selection and use of these tools will ensure the safety of the procedure and high-quality results. Don’t forget that only a professional approach and high-quality tools can make your look as expressive and attractive as possible."2 -
God damn it wpf I just wanna bind an ObservableCollection<string> to an itembox and then have textfields inside that item box that modifies those strings and have the modifications stay there https://imgur.com/a/Un2nk9V !7
-
Web dev (JS, node) question since there are so many here... I think...
I want to return a JSON array as a stream so the server passes whatever the DB returns but also normalize each record.
Also the data is across several collections. Is it possible to return this in a single request?
And how do I add in error handling? If there's an error in between the user already has part of the data?3 -
any recommendations for a personal photography website? i need it to be open source, clean design, and easy to use. i'd like to have collections of photos. i was thinking jekyll, but if there's something more targeted for a photography website, i'd like your recommendations.4
-
When learning a new language I look up public repos on github, specifically those who are just collections of algos in different languages, and take a look + try to implement it in a different way. The good ones also have maintainers that actually take a look at your code when you open a PR and give you some hints if they are proficient in that language.
-
I hate manipulating collections. It's difficult matter for me. Nodes, trees, traversal, efficiency. Argh.14
-
Any Firestore experience willing to help me ?
I got 3 big collections let's say they are 1:1:n how should I save them in 🔥 so I can query them efficient when I have parameters for each of them in a query -
PHP's array_diff()
Simplifies everything from diff-ing two collections to finding model differences. -
Time to take my whiteboard and draw out inheritance hierarchies in an effort to understand (Java) Collections. :)3
-
Just discovered https://twitter.com/ExpertBeginner1. It's the story of my life. Giant classes, copying and pasting, and architects who create frameworks. It's great when we combine all three: A "framework" created by an architect which is made of giant classes that you copy and paste. Imagine a giant generic class where the generic argument is only used by dead code. Pause for a moment and try to visualize that.
It inherits from a base class with lots of virtual methods called by base methods that throw NotImplementedException, so if you don't need them you have to override them to return empty collections. If you're going to do something so messed up you could just put those default implementations in the base. But no, you can inherit, it compiles, and then it throws a runtime error unless you override methods the compiler doesn't require you to override.
The one method you're required to override has a TODO comment telling you what to put there. Except don't ever do what the comment says because that's the old standard. The new standard says never, ever do that.
Most of the time when I read about copy-and-paste coding it's about devs who copy and paste because they don't know how to write or reuse code. They don't mention the environments where copying and pasting the same classes over and over again is the requirement and you're not allowed to write your own code.
Creating base classes where you just override a method or two can potentially work, but only in the right scenarios and only if you do it right. If you're copying and pasting a class that inherits from the base class and consists entirely of repeated code, why the heck isn't that the base class? It could be a total mess, but at least it would be out of sight and each successive developer wouldn't become responsible for it by including it in their own code.
It's a temporary engagement, but I feel almost violated. I know it's a first-world problem, and I get to work indoors and take vacations. I'm grateful for those things.
Before leaving I had to document the entire process of copying and pasting an entire repo, making a ton of baseline edits that should just be in the template but aren't, and then copying and pasting from other places into the copied and pasted code. That makes me a collaborator. I apologize more than once in the documentation, all 20 pages of it that you have to read and follow before you even get to the part where you write the code for what you actually need it to do.
This architect has succeeded in making every single thing anyone does more about servicing the needs of his "framework" than about writing actual code to do what needs doing. Now that the framework is in and around everything it creates the illusion that it's a critical part of our operations. It's not. It's useless overhead.
Because management is deceived into thinking they need it they overlook the fact that it blows up, big and small, every single day. The log is full of failures that I know no one ever sees. A big chunk of what they think it does fails silently, and they don't even notice until months later when they realize how much data they're missing. But if they lose, say, 25% they'll never notice.
When they do notice they just act like it's normal, go into fire drill mode, and fix it. Doom. You're all doomed. I'm standing on the deck of the Titanic next to my jet ski.1 -
Follow up sorta...
So I got pulled into a support issue on a day off. Some system was facing timeouts on our servers so had to investigate.
Over the weekend as part of the release, I released the ELK stack I built and today I used that to help.
Pretty much immediately pinpointed which machine was hanging though still had to investigate and confirm so split between KQL and checking the server logs.
One thing I've always griped about is how no one created schema docs for it mongo collections so can't easily figure out what they do or your to get the document needed.
Well guess it's my turn.... Because only I know the schema :) -
I am using MERN to develop a poll app. I have 6 collections in my database. I have an API for each collection, 4 of those API returns the data whereas the other 2 return 'undefined'. What is the issue I am facing? Is MongoDB not allowing me to use more than 4 collections?6
-
Hi guys! Last time you gave me a lot of good advice about my gophers. Thanks! Kubernetes Contributor Celebration is coming soon so I have these cute gophers
If you liked it and want to support me on Redbubble
https://redbubble.com/people/...
or TeePublic https://teepublic.com/user/...
Thanks!5 -
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