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 - "optimization"
-
Optimized my program fron running 74 minutes to running 0.005 seconds. I call that a successful day.34
-
Oh, man, I just realized I haven't ranted one of my best stories on here!
So, here goes!
A few years back the company I work for was contacted by an older client regarding a new project.
The guy was now pitching to build the website for the Parliament of another country (not gonna name it, NDAs and stuff), and was planning on outsourcing the development, as he had no team and he was only aiming on taking care of the client service/project management side of the project.
Out of principle (and also to preserve our mental integrity), we have purposely avoided working with government bodies of any kind, in any country, but he was a friend of our CEO and pleaded until we singed on board.
Now, the project itself was way bigger than we expected, as the wanted more of an internal CRM, centralized document archive, event management, internal planning, multiple interfaced, role based access restricted monster of an administration interface, complete with regular user website, also packed with all kind of features, dashboards and so on.
Long story short, a lot bigger than what we were expecting based on the initial brief.
The development period was hell. New features were coming in on a weekly basis. Already implemented functionality was constantly being changed or redefined. No requests we ever made about clarifications and/or materials or information were ever answered on time.
They also somehow bullied the guy that brought us the project into also including the data migration from the old website into the new one we were building and we somehow ended up having to extract meaningful, formatted, sanitized content parsing static HTML files and connecting them to download-able files (almost every page in the old website had files available to download) we needed to also include in a sane way.
Now, don't think the files were simple URL paths we can trace to a folder/file path, oh no!!! The links were some form of hash combination that had to be exploded and tested against some king of database relationship tables that only had hashed indexes relating to other tables, that also only had hashed indexes relating to some other tables that kept a database of the website pages HTML file naming. So what we had to do is identify the files based on a combination of hashed indexes and re-hashed HTML file names that in the end would give us a filename for a real file that we had to then search for inside a list of over 20 folders not related to one another.
So we did this. Created a script that processed the hell out of over 10000 HTML files, database entries and files and re-indexed and re-named all this shit into a meaningful database of sane data and well organized files.
So, with this we were nearing the finish line for the project, which by now exceeded the estimated time by over to times.
We test everything, retest it all again for good measure, pack everything up for deployment, simulate on a staging environment, give the final client access to the staging version, get them to accept that all requirements are met, finish writing the documentation for the codebase, write detailed deployment procedure, include some automation and testing tools also for good measure, recommend production setup, hardware specs, software versions, server side optimization like caching, load balancing and all that we could think would ever be useful, all with more documentation and instructions.
As the project was built on PHP/MySQL (as requested), we recommended a Linux environment for production. Oh, I forgot to tell you that over the development period they kept asking us to also include steps for Windows procedures along with our regular documentation. Was a bit strange, but we added it in there just so we can finish and close the damn project.
So, we send them all the above and go get drunk as fuck in celebration of getting rid of them once and for all...
Next day: hung over, I get to the office, open my laptop and see on new email. I only had the one new mail, so I open it to see what it's about.
Lo and behold! The fuckers over in the other country that called themselves "IT guys", and were the ones making all the changes and additions to our requirements, were not capable enough to follow step by step instructions in order to deploy the project on their servers!!!
[Continues in the comments]26 -
Yesterday I managed to optimize a query...
Went from 43 seconds to 0.0702 seconds.
For some reason mysql decided to copy the data of 4 huge tables into a temp table and do its operations there... (the copying to temp tale took 42/43 seconds)
Two composite indexes later and I saved the company hours of time over the course of a few months.
Feels good.14 -
I absolutely HATE "web developers" who call you in to fix their FooBar'd mess, yet can't stop themselves from dictating what you should and shouldn't do, especially when they have no idea what they're doing.
So I get called in to a job improving the performance of a Magento site (and let's just say I have no love for Magento for a number of reasons) because this "developer" enabled Redis and expected everything to be lightning fast. Maybe he thought "Redis" was the name of a magical sorcerer living in the server. A master conjurer capable of weaving mystical time-altering spells to inexplicably improve the performance. Who knows?
This guy claims he spent "months" trying to figure out why the website couldn't load faster than 7 seconds at best, and his employer is demanding a resolution so he stops losing conversions. I usually try to avoid Magento because of all the headaches that come with it, but I figured "sure, why not?" I mean, he built the website less than a year ago, so how bad can it really be? Well...let's see how fast you all can facepalm:
1.) The website was built brand new on Magento 1.9.2.4...what? I mean, if this were built a few years back, that would be a different story, but building a fresh Magento website in 2017 in 1.x? I asked him why he did that...his answer absolutely floored me: "because PHP 5.5 was the best choice at the time for speed and performance..." What?!
2.) The ONLY optimization done on the website was Redis cache being enabled. No merged CSS/JS, no use of a CDN, no image optimization, no gzip, no expires rules. Just Redis...
3.) Now to say the website was poorly coded was an understatement. This wasn't the worst coding I've seen, but it was far from acceptable. There was no organization whatsoever. Templates and skin assets are being called from across 12 different locations on the server, making tracking down and finding a snippet to fix downright annoying.
But not only that, the home page itself had 83 custom database queries to load the products on the page. He said this was so he could load products from several different categories and custom tables to show on the page. I asked him why he didn't just call a few join queries, and he had no idea what I was talking about.
4.) Almost every image on the website was a .PNG file, 2000x2000 px and lossless. The home page alone was 22MB just from images.
There were several other issues, but those 4 should be enough to paint a good picture. The client wanted this all done in a week for less than $500. We laughed. But we agreed on the price only because of a long relationship and because they have some referrals they got us in the door with. But we told them it would get done on our time, not theirs. So I copied the website to our server as a test bed and got to work.
After numerous hours of bug fixes, recoding queries, disabling Redis and opting for higher innodb cache (more on that later), image optimization, js/css/html combining, render-unblocking and minification, lazyloading images tweaking Magento to work with PHP7, installing OpCache and setting up basic htaccess optimizations, we smash the loading time down to 1.2 seconds total, and most of that time was for external JavaScript plugins deemed "necessary". Time to First Byte went from a staggering 2.2 seconds to about 45ms. Needless to say, we kicked its ass.
So I show their developer the changes and he's stunned. He says he'll tell the hosting provider create a new server set up to migrate the optimized site over and cut over to, because taking the live website down for maintenance for even an hour or two in the middle of the night is "unacceptable".
So trying to be cool about it, I tell him I'd be happy to configure the server to the exact specifications needed. He says "we can't do that". I look at him confused. "What do you mean we 'can't'?" He tells me that even though this is a dedicated server, the provider doesn't allow any access other than a jailed shell account and cPanel access. What?! This is a company averaging 3 million+ per year in revenue. Why don't they have an IT manager overseeing everything? Apparently for them, they're too cheap for that, so they went with a "managed dedicated server", "managed" apparently meaning "you only get to use it like a shared host".
So after countless phone calls arguing with the hosting provider, they agree to make our changes. Then the client's developer starts getting nasty out of nowhere. He says my optimizations are not acceptable because I'm not using Redis cache, and now the client is threatening to walk away without paying us.
So I guess the overall message from this rant is not so much about the situation, but the developer and countless others like him that are clueless, but try to speak from a position of authority.
If we as developers don't stop challenging each other in a measuring contest and learn to let go when we need help, we can get a lot more done and prevent losing clients. </rant>14 -
The way 90% of the population wears their face masks really explains a lot about their approach to using software, apps & websites as well.
I feel like giving up.
I am not a developer for the salary, or just to solve analytical puzzles. Those are motivators, but my main drive is to make the world more comfortable and enjoyable, better optimized, build ethical services which bring happiness into people's lives. I want to improve society, even if it's just a tiny bit.
But if users invest absolutely zero percent of their limited brain capacity into understanding a product that already has a super-clean design and responds with helpful validation messages...
...why the fuck bother.
I used to think of the gap between technology and tech-incompetent people as an optimization problem.
As something which could be fixed by spending a fortune on UX research. Write tests, hire QA employees, decrease tech debt, create a bold but unified & simple design.
But the technologically incompetent just get more entitled with every small thing you simplify.
It's never fucking fool-proof enough.
Why can't I upload a 220MB PDF as profile picture? Why doesn't the app install on my 9 year old Android Froyo phone? Why can't I sign up if my phone number contains a  U+FFFC? Why does this page load so slowly from my rural concrete bunker in East Ukraine? WHY DO I HAVE PNEUMONIA, HOW DID I GET INFECTED EVEN THOUGH I WAS WEARING A MOUTH MASK ON MY FOREHEAD?
This is why I ran away from Frontend, to Backend, to DBA.
If I could remove myself further from the end user, I would.
At least I still have a full glass of tawny port and a huge database which needs to be normalized & migrated.
Fuck humans, I'm going to hug a server.25 -
Client: Can you provide some kind of guaranteed timeline that you're going to be able to move our website to our new servers with the optimizations implemented? I know you said it should take a week, but we have 3 weeks to get this moved over and we cannot afford to be double billed. I'm waiting to fire up the new server until you can confirm.
Me: As I said, it SHOULD take about a week, but that's factoring in ONLY the modifications being made for optimization and a QA call to review the website. This does not account for your hosting provider needing to spin up a new server.
We also never offered to move your website over to said new server. I sent detailed instructions for your provider to move a copy of the entire website over and have it configured and ready to point your domain over to, in order to save time and money since your provider won't give us the access necessary to perform a server-to-server transfer. If you are implying that I need to move the website over myself, you will be billed for that migration, however long it takes.
Client: So you're telling me that we paid $950 for 10 hours of work and that DOESN'T include making the changes live?
Me: Why would you think that the 10 hours that we're logged for the process of optimizing your website include additional time that has not been measured? When you build out a custom product for a customer, do you eat the shipping charges to deliver it? That is a rhetorical question of course, because I know you charge for shipping as well. My point is that we charge for delivery just as you do, because it requires our time and manpower.
All of this could have been avoided, but you are the one that enforced the strict requirement that we cannot take the website down for even 1 hour during off-peak times to incorporate the changes we made on our testbed, so we're having to go through this circus in order to deliver the work we performed.
I'm not going to give you a guarantee of any kind because there are too many factors that are not within our control, and we're not going to trap ourselves so you have a scapegoat to throw under the bus if your boss looks to you for accountability. I will reiterate that we estimate it would take about a week to implement, test and run through a full QA together, as we have other clients within our queue and our time must be appropriately blocked out each day. However, the longer you take to pull the trigger on this new server, the longer it will take on my end to get the work scheduled within the queue.
Client: If we get double billed, we're taking that out of what we have remaining to pay you.
Me: On the subject of paying us, you signed a contract acknowledging that you would pay us the remaining 50% after you approved the changes, which you did last week, in order for us to deliver the project. Thank you for the reminder that your remaining balance has not yet been paid. I'll have our CFO resend the invoice for you to remit payment before we proceed any further.
---
I love it when clients give me shit. I just give it right back.6 -
I like backend development because I love how rewarding it feels to write systems that are consumed by multiple frontends. It always feels like a lot is at stake and small optimization can make a lot of user experiences faster.4
-
Me: "I'm a programmer"
Others: talks about linux
Others: search algorithms!
Others: service infrastructure
Others: memory optimization
Others: encryption
Me: "I'm a front end web developer"
Others: complex services
Others: strong user form validation
Others: lazy loading
Others: SEO
Me: "fucking, I make shit look pretty alright"11 -
Me to IT team: I need a more powerful machine to run my optimization code on.
IT: Okay take this - 64 gigs + i7HQ
Me after an hour:21 -
Fuck you, devs who quote Knuth:
"Premature optimization is the root of all evil"
I agree with the spirit of the quote. I agree that long-winded arguments comparing microsecond differences in performance between looping or matching constructs in a language syntax is almost always nonsense. Slightly slower code can even be preferable if it's significantly clearer, safer and easier to maintain.
But, two fucking points need to be made to you lazy quickfix hipsters trying to sell your undercooked spaghetti code as "al dente", just fucking admit that you had no clue what you were doing.
So here we go:
1. If you write neat correct code in one go, you don't need to spend time to optimize it. Takes time to learn the right patterns, but will save you time during the rest of your career.
2. If you quote Knuth, at least provide the context: "We should forget about small efficiencies, say about 97% of the time [...] Yet we should not pass up our opportunities in that critical 3%"
YES THAT CRITICAL 3% IS WHERE YOU MESSED UP.
I'll forgive you for disgorging your codevomit into this silly PR.
BUT YOU'RE QUOTING KNUTH IN YOUR DEFENSE?
Premature optimization is the root of all evil... 6300 SQL queries to show a little aggregate graph on the dashboard... HE WOULD FUCKING SLAP YOUR KEYBOARD IN HALF IN YOUR FACE.3 -
I sometimes write code by first putting comments and then writing the code.
Example
#fetch data
#apply optimization
#send data back to server
Then i put the code in-between the comments so that i can understand the flow.
Anyone else has this habit?18 -
Hey, Root? How do you test your slow query ticket, again? I didn't bother reading the giant green "Testing notes:" box on the ticket. Yeah, could you explain it while I don't bother to listen and talk over you? Thanks.
And later:
Hey Root. I'm the DBA. Could you explain exactly what you're doing in this ticket, because i can't understand it. What are these new columns? Where is the new query? What are you doing? And why? Oh, the ticket? Yeah, I didn't bother to read it. There was too much text filled with things like implementation details, query optimization findings, overall benchmarking results, the purpose of the new columns, and i just couldn't care enough to read any of that. Yeah, I also don't know how to find the query it's running now. Yep, have complete access to the console and DB and query log. Still can't figure it out.
And later:
Hey Root. We pulled your urgent fix ticket from the release. You know, the one that SysOps and Data and even execs have been demanding? The one you finished three months ago? Yep, the problem is still taking down production every week or so, but we just can't verify that your fix is good enough. Even though the changes are pretty minimal, you've said it's 8x faster, and provided benchmark findings, we just ... don't know how to get the query it's running out of the code. or how check the query logs to find it. So. we just don't know if it's good enough.
Also, we goofed up when deploying and the testing database is gone, so now we can't test it since there are no records. Nevermind that you provided snippets to remedy exactly scenario in the ticket description you wrote three months ago.
And later:
Hey Root: Why did you take so long on this ticket? It has sat for so long now that someone else filed a ticket for it, with investigation findings. You know it's bringing down production, and it's kind of urgent. Maybe you should have prioritized it more, or written up better notes. You really need to communicate better. This is why we can't trust you to get things out.
*twitchy smile*rant useless people you suck because we are incompetent what's a query log? it's all your fault this is super urgent let's defer it ticket notes too long; didn't read21 -
Best boss I have ever had?
He owned a car dealership and made me the first fulltime employed webdev in a car dealership in germany.
He believed in me and our mutual vision, and we had an awesome 7.5 years together. he gave me time to develop myself and to develop software and websites.
through my software and process optimization we were able to go from 300 sold cars per year to 3000 without hiring any more employees and without increasing workload and stress on the employees.
When I had my last day at his company, he didn't show up.
I was mad like hell, because we have spent so much time together, went to many countries together, even slept in the same hotel bed! I considered him pretty much a friend, even though he was my boss and 10 years older.
Much later he told me that he didn't show up on my last day because he didn't want to cry.
now we meet every 3 months and go out, eat and drink and just talk and laugh.
best guy ever, will never forget what he did for me.12 -
Fuck the memes.
Fuck the framework battles.
Fuck the language battles.
Fuck the titles.
Anybody who has been in this field long enough knows that it doesn't matter if your linus fucking torvalds, there is no human who has lived or ever will live that simultaneously understands, knows, and remembers how to implement, in multiple languages, the following:
- jest mocks for complex React components (partial mocks, full mocks, no mocks at all!)
- token cancellation for asynchronous Tasks in C#
- fullstack CRUD, REST, and websocket communication (throw in gRPC for bonus points)
- database query optimization, seeding, and design
- nginx routing, https redirection
- build automation with full test coverage and environment consideration
- docker container versioning, restoration, and cleanup
- internationalization on both the front AND backends
- secret storage, security audits
- package management, maintenence, and deprecation reviews
- integrating with dozens of APIs
- fucking how to center a div
and that's a _comically_ incomplete list; barely scratches the surface of the full range of what a dev can encounter in a given day of writing software
have many of us probably done one or even all of these at different times? surely.
but does that mean we are supposed to draw that up at a moment's notice some cookie-cutter solution like a fucking robot and spit out an answer on a fax sheet?
recruiters, if you read this site (perhaps only the good ones do anyway so its wasted oxygen), just know that whoever you hire its literally the luck of the draw of how well they perform during the interview. sure, perhaps some perform better, but you can never know how good someone is until they literally start working at your org, so... have fun with that.
Oh and I almost forgot, again for you recruiters, on top of that list which you probably won't ever understand for the entirety of your lives, you can also add writing documentation, backup scripts, and orchestrating / administrating fucking JIRA or actually any somewhat technical dashboard like a CMS or website, because once again, the devs are the only truly competent ones - and i don't even mean in a technical sense, i mean in a HUMAN sense of GETTING SHIT DONE IN GENERAL.
There's literally 2 types of people in the world: those who sit around drawing flow charts and talking on the phone all day, and those WHO LITERALLY FUCKING BUILD THE WORLD
why don't i just run the whole fucking company at this point? you guys are "celebrating" that you made literally $5 dollars from a single customer and i'm just sitting here coding 12 hours a day like all is fine and well
i'm so ANGRY its always the same no matter where i go, non-technical people have just no clue, even when you implore them how long things take, they just nod and smile and say "we'll do it the MVP way". sure, fine, you can do that like 2 or 3 times, but not for 6 fucking months until you have a stack of "MVPs" that come toppling down like the garbage they are.
How do expect to keep the "momentum" of your customers and sales (I hope you can hear the hatred of each of these market words as I type them) if the entire system is glued together with ducktape because YOU wanted to expedite the feature by doing it the EASY way instead of the RIGHT way. god, just forget it, nobody is going to listen anyway, its like the 5th time a row in my life
we NEED tests!
we NEED to know our code coverage!
we NEED to design our system to handle large amounts of traffic!
we NEED detailed logging!
we NEED to start building an exception database!
BILBO BAGGINS! I'm not trying to hurt you! I'm trying to help you!
Don't really know what this rant was, I'm just raging and all over the place at the universe. I'm going to bed.20 -
I once optimized a web page that performed 621 SQL queries and loaded in 21 seconds in a production app.8
-
My coworker complained about an way to big Angular build (20 MB in prod!).
We looked over his code.
... Well deleting that 200 unused base64 encoded images shrinked it down to 500kB
DELETE the Code you replace14 -
That moment when you optimize something from taking ~10 minutes to ~17 seconds and are unsure if you managed to actually optimize that much or did you create a bug that doesn't return half the data...
Please let it be the former.5 -
Modern software has gotten so bad that it even gets sluggish at times on late 2018 flagship devices. Slow, cheap hardware like is usually developers' and fanboys' excuse, particularly when it comes to Windows stuff? Like hell it is.
Software "engineering" has become so.. terribly inefficient. I'd dare any developer worth their salt to rewrite their program to make it work on an early 2000's machine. After all, those can run pretty advanced GUI's, have a reasonable amount of hardware (just think about how large a gigabyte of RAM really is) yet should be able to make for a reasonable limitation set.
Hardware limitations are the mother of optimization. Not every person on the planet has a 32-core Xeon workstation with 64GB of DDR4 RAM and a GTX Titan in it. Whether your application performs reasonably well on your machine shouldn't be the metric. Try deploying it on that laptop you tucked into a shelf years ago and reevaluate.. please.
And definitely you Slack!! Slacking off, is that what inspired the name of that pile of junk?! 😡26 -
⚡️ devRantron v1.4.1 ⚡️
I strongly urge all the users of the devRantron to upgrade their app. We have added some major features and made a lot of bugfixes. For example:
1. Edit Rants and Comments
2. Browse Weekly
3. Save drafts of rants so that you can edit and post them later. Also, the app now autosaves when you are typing a new rant and will keep it until you post it.
4. Fixed macOS startup. Previously the app used to open a terminal in the background to launch the app. That has been removed.
5. Confirmation before deleting a rant or comment
6. Huge performance optimization. We have upgraded to React 16 and also changed the way our compiler compiles the application. The way we fetch the notifications has also been changed and it uses less bandwidth.
7. The app will only have single instance now. If you accidentally open the app again, it will just switch to the currently running instance.
8. We now show a release info dialogue before updating. Linux and macOS users will now receive an update notification for new updates.
9. Added the ability to select rant types.
You can get it from here: https://devrantron.firebaseapp.com/
macOS users, please remove the devRantron from "Login Items" in Settings > Users and Groups.
We would like to thank all our users for giving us the feedbacks. If you like the app, you can show your appreciation by giving a start to the repo.
Thank you!23 -
I had 2 options.
Option 1: Read and increase knowledge.
Option 2: Take a sentence out of context and make a meme3 -
#2 Worst thing I've seen a co-worker do?
Back before we utilized stored procedures (and had an official/credentialed DBA), we used embedded/in-line SQL to fetch data from the database.
var sql = @"Select
FieldsToSelect
From
dbo.Whatever
Where
Id = @ID"
In attempts to fix database performance issues, a developer, T, started putting all the SQL on one line of code (some sql was formatted on 10+ lines to make it readable and easily copy+paste-able with SSMS)
var sql = "Select ... From...Where...etc";
His justification was putting all the SQL on one line make the code run faster.
T: "Fewer lines of code runs faster, everyone knows that."
Mgmt bought it.
This process took him a few months to complete.
When none of the effort proved to increase performance, T blamed the in-house developed ORM we were using (I wrote it, it was a simple wrapper around ADO.Net with extension methods for creating/setting parameters)
T: "Adding extra layers causes performance problems, everyone knows that."
Mgmt bought it again.
Removing the ORM, again took several months to complete.
By this time, we hired a real DBA and his focus was removing all the in-line SQL to use stored procedures, creating optimization plans, etc (stuff a real DBA does).
In the planning meetings (I was not apart of), T was selected to lead because of his coding optimization skills.
DBA: "I've been reviewing the execution plans, are all the SQL code on one line? What a mess. That has to be worst thing I ever saw."
T: "Yes, the previous developer, PaperTrail, is incompetent. If the code was written correctly the first time using stored procedures, or even formatted so people could read it, we wouldn't have all these performance problems."
DBA didn't know me (yet) and I didn't know about T's shenanigans (aka = lies) until nearly all the database perf issues were resolved and T received a recognition award for all his hard work (which also equaled a nice raise).7 -
How I play mobile games:
-Try to hack it to get infinite $$$, God mode
-Success?
--Yes: play til bored or "finished" (they never finish)
--No: Uninstall
Is this efficiency optimization, maximizing utility, or cheating?14 -
-Let's start making the game!
-Yaay
-We should focus on performance optimization!
-But we don't have anything to optimize yet..
-Performance optimization!!!
1 month later
-OK you were right, we can't focus on performance now. We need to start making this game!
-Finally!
-So we're in pre-production now, let's do some R&D!
-Awesome, I wanted to start designing our workflow for adding new content, and maybe also loca..
-NO! That's unimportant! We must do R&D!
-OK what should we Arr-and-Dee?
-Performance optimization!!!5 -
Wonder if I'll ever feel like a real programmer in web dev surrounded with C++ gurus that eat, sleep, and breathe memory allocation and optimization algorithms. I'm just over here like... You can go to this link and a pretty red box moves around on the screen27
-
I like memory hungry desktop applications.
I do not like sluggish desktop applications.
Allow me to explain (although, this may already be obvious to quite a few of you)
Memory usage is stigmatized quite a lot today, and for good reason. Not only is it an indication of poor optimization, but not too many years ago, memory was a much more scarce resource.
And something that started as a joke in that era is true in this era: free memory is wasted memory. You may argue, correctly, that free memory is not wasted; it is reserved for future potential tasks. However, if you have 16GB of free memory and don't have any plans to begin rendering a 3D animation anytime soon, that memory is wasted.
Linux understands this. Linux actually has three States for memory to be in: used, free, and available. Used and free memory are the usual. However, Linux automatically caches files that you use and places them in ram as "available" memory. Available memory can be used at any time by programs, simply dumping out whatever was previously occupying the memory.
And as you well know, ram is much faster than even an SSD. Programs which are memory heavy COULD (< important) be holding things in memory rather than having them sit on the HDD, waiting to be slowly retrieved. I much rather a web browser take up 4 GB of RAM than sit around waiting for it to read the caches image off my had drive.
Now, allow me to reiterate: unoptimized programs still piss me off. There's no need for that electron-based webcam image capture app to take three gigs of memory upon launch. But I love it when programs use the hardware I spent money on to run smoother.
Don't hate a program simply because it's at the top of task manager.6 -
- Premature optimization is bad and wastes your time
- You need to see the big picture
- Always add extra hours to your estimates
- Test your feature like a QA engineer; look for the edge cases2 -
"Don't do your thesis creating AI software, AI is basically just optimization and wont be applicable to many industries." Thesis advisor, 20093
-
> TeamLeader1: I just discovered SQL is actually super fast! The low responsiveness I've experienced comes from our ORM!
> IHateForALiving: well of course SQL is blazingly fast. SQL has been refined by the best engineers in the world for the past 50 years, its performances are unparalleled for everything you could possibly need, unless you want to scale REALLY big. Sequelize, instead, is an Active Record ORM, so it's bound to struggle with huge amount of data, because every single row will get attached a significant amount of black magic to make sure everything syncs correctly. Why is that?
> TeamLeader1: I have a problem with this frontend component, it doesn't allow pagination. I tried downloading the whole DB to bypass that, but the ORM is slow... so I will bypass the ORM and download the whole table with a raw query. Look at that! It works like a charm, it's super duper fast!'
This mf is downloading some 35 thousand rows every time some user loads a page because he doesn't know how to paginate the fucking table with Angular, there's no way these people are real.12 -
A couple weeks ago, my coworkers built a site where 90% of pages consisted of all images and uncompressed images at that. I'm talking even the text was images. At the time I told my boss that it should be done with css and this would later come to bite them in the ass with page load speed and seo. He ignored me and said it was fine. Well today my boss assigned me with going back and basically removing images with things that can be done with css because load speed was terrible and seo wasnt too hot. Maybe if he listened to me from the get go, he wouldn't have to assign me this unnecessary work and I can focus on cleaning up all the other piss poor excuse of websites they have. Seriously tired of feeling like I, the junior dev is doing the teaching to these "senior developers" who get paid like twice as much as I do when I'm the one who is always doing the cleanups /optimization and guiding them on all their problems. Is it Friday yet?-_-4
-
I swear I work with mentally deranged lunatics.
Dev is/was using TFS's web api to read some config stuff..
Ralph: "Ugh..this is driving me crazy. I've spent all day trying to read this string from TFS and it is not working"
Me: "Um, reading a string from an web api is pretty easy, what's the problem?"
Ralph: "I'm executing the call in a 'using' statement and cannot return the stream."
Me: "Why do you need to return a stream? Return the object you are looking for."
Ralph: "Its not that easy. You can return anything from TFS. All you get back is a stream. Could be XML, JSON, text file, image, anything."
Me: "What are you trying to return?"
Ralph: "XML config. If I use XDoc, the stream works fine, but when I step into each byte from the stream, I the first three bytes have weird characters. I shouldn't have to skip the first three bytes to get the data. I spent maybe 5 hours yesterday digging around the .Net stream readers used in XDoc trying to figure out how it skips the first few bytes."
Me: "Wow...I would have used XDoc and been done and not worried about that other junk."
Ralph: "But I don't know the stream is XML. That's what I need to figure out."
Me: "What is there to figure out? You do know. Its your request. You are requesting a XML config."
Ralph: "No, the request can be anything. What if Sam requests an image? XDoc isn't going to work."
Me: "Is that a use-case? Sam requesting an image?"
Ralph: "Uh..I don't know...he could"
Me: "Sounds like your spending a lot of time doing premature optimization. You know what your accessing TFS for, if it's XML, return XML. If it's an image, return an image. Something new comes along, modify the code to handle it. Eazy peezy."
<boss walks in from a meeting>
Boss: "Whats up guys?"
Ralph: "You know the problem with TFS and not being able to stream the data I had all day yesterday? I finally figured it out. I need to keep this TFS reader simple. I'll start with the XML configs and if we more readers later, we can add them."
Boss: "Oh yea, always start simple and add complexity only when you need it."
Frack...Frack..Frack...you played some victim complaining to anyone who would listen yesterday (which I mostly ignored) about reading data from TFS was this monumental problem no one could solve, then you start complaining to me, I don't fall for the BS, then tell the boss the solution was your idea?
Lunatic or genius? Wally would be proud.4 -
This rant is particularly directed at web designers, front-end developers. If you match that, please do take a few minutes to read it, and read it once again.
Web 2.0. It's something that I hate. Particularly because the directive amongst webdesigners seems to be "client has plenty of resources anyway, and if they don't, they'll buy more anyway". I'd like to debunk that with an analogy that I've been thinking about for a while.
I've got one server in my home, with 8GB of RAM, 4 cores and ~4TB of storage. On it I'm running Proxmox, which is currently using about 4GB of RAM for about a dozen VM's and LXC containers. The VM's take the most RAM by far, while the LXC's are just glorified chroots (which nonetheless I find very intriguing due to their ability to run unprivileged). Average LXC takes just 60MB RAM, the amount for an init, the shell and the service(s) running in this LXC. Just like a chroot, but better.
On that host I expect to be able to run about 20-30 guests at this rate. On 4 cores and 8GB RAM. More extensive migration to LXC will improve this number over time. However, I'd like to go further. Once I've been able to build a Linux which was just a kernel and busybox, backed by the musl C library. The thing consumed only 13MB of RAM, which was a VM with its whole 13MB of RAM consumption being dedicated entirely to the kernel. I could probably optimize it further with modularization, but at the time I didn't due to its experimental nature. On a chroot, the kernel of the host is used, meaning that said setup in a chroot would border near the kB's of RAM consumption. The busybox shell would be its most important RAM consumer, which is negligible.
I don't want to settle with 20-30 VM's. I want to settle with hundreds or even thousands of LXC's on 8GB of RAM, as I've seen first-hand with my own builds that it's possible. That's something that's very important in webdesign. Browsers aren't all that different. More often than not, your website will share its resources with about 50-100 other tabs, because users forget to close their old tabs, are power users, looking things up on Stack Overflow, or whatever. Therefore that 8GB of RAM now reduces itself to about 80MB only. And then you've got modern web browsers which allocate their own process for each tab (at a certain amount, it seems to be limited at about 20-30 processes, but still).. and all of its memory required to render yours is duplicated into your designated 80MB. Let's say that 10MB is available for the website at most. This is a very liberal amount for a webserver to deal with per request, so let's stick with that, although in reality it'd probably be less.
10MB, the available RAM for the website you're trying to show. Of course, the total RAM of the user is comparatively huge, but your own chunk is much smaller than that. Optimization is key. Does your website really need that amount? In third-world countries where the internet bandwidth is still in the order of kB/s, 10MB is *very* liberal. Back in 2014 when I got into technology and webdesign, there was this rule of thumb that 7 seconds is usually when visitors click away. That'd translate into.. let's say, 10kB/s for third-world countries? 7 seconds makes that 70kB of available network bandwidth.
Web 2.0, taking 30+ seconds to load a web page, even on a broadband connection? Totally ridiculous. Make your website as fast as it can be, after all you're playing along with 50-100 other tabs. The faster, the better. The more lightweight, the better. If at all possible, please pursue this goal and make the Web a better place. Efficiency matters.9 -
Windows 10 source code apparently leaked!
The main.c file is short tho and unchanged since 95(it's just run in parallel) so I'mma just paste it here:
void WinMain(int nCmdArgs){
static int userDisgust = 5; //he/she booted up Win10 so 5 to begin with
Time time = Time.time;
while(!crashed){
Time time2 = Time.time;
if(time + 3600 < time2){
ApplyUpdate();
sleep(500000); //users can stretch, have a tea and overall be healthier, happier and better part of society
if(restartNecessary){
Restart();
}
Restart(); // just in case
}
SendUserData();
SendMoreUserData();
for(int i = 1; i < 99+1; i++){
RunUserApps();
UninstallUnnecessaryApps(); // keeps blacklist of apps that John and I don't like
AnnoyUser(); // added a function that slows the computer down significantly and reduces lifespan of the hardware so it's not just a short term gain
if(shouldRepeat){
//break; -- this caused some issue in one special case and we don't know why so we'll just omit it and add a fancy button elsewhere
}
userDisgust++;
}
if(userDisgust >= 2147483647) { //mission finished
Crash();
crashed = true;
}
}
String error = Windows.GetFullErrorMessage();
error.cat(Windows.GetRegistersDump());
error.cat(Windows.GetErrorCode());
error.cat(Windows.GetStackTrace());
error.erase(); // so that it doesn't occupy any space and allows the error to be resolved more quickly, release major optimization Update
BSOD(_T("We're sorry :/"));
}6 -
Just optimized a bottleneck function in a program down from 160ms to 3ms. First time I've ever used a profiler, and it feels awesome.1
-
I attended a data science meetup recently. There were many suits walking around the corridors because of some startup night taking place at the same time.
After some time a guy appeared infront of me, telling me he was afraid at first that this was a meetup for suits only. Until he saw all the dev and rock stickers on my notebook. He was reliefed that there was some nerd at least.
He asked what I was doing so I told him about my startup about optimization of heat generation plants jada jada. I asked him back.
He replied, "Well, I'm also part of some small startup. Among the things we develop processors and stuff. It's called Intel."
Well dude, that was nicely played. I had a lot of fun that evening.5 -
If programming languages had honest slogans, what would they be?
C: If you want a horse, make sure you feed it, clean it and secure it yourself. No warranties.
C++: If you want a horse, you need to buy a circus along with it.
Java: Before you buy a horse - buy a piece of land, build a house in that land, build a barn beside the house & if you are not bankrupt yet, buy the horse and then put the horse in the barn.
C#: You don’t want a horse, but Microsoft wants you to have a horse. Now it’s up to you if you want Microsoft or not.
Swift: Don’t buy an overpriced Unicorn if all you wanted was a horse.
JavaScript: If you want to buy a horse & confidently ride it, make sure you read a book named "You don't know horse".
PHP: After enough optimization, your horse can compete the top most horses in the world; but deep down, you'll always know it's an ass.
Hack: Let's face it, even if you take the ass from the ass lovers and give them back a horse in exchange, not many will ride it.
Ruby: If you want a horse, make sure you ride it on top of rail roads, even if the horse can't run fast on rails.
Python: Don't ride your horse and eat your sandwich on the same line, until you indent it on the next line.
Bash: Your horse may shit everywhere, but at least it gets the job done.
R: You are the horse. R will ride you.
Got this from Quora.
https://quora.com/If-programming-la...7 -
Today I saw a code written by my junior. Basically excel export. The laravel excel package provide great ways for optimization.
My junior instead did 6 times loop to modify the data before giving that data to the export package. We need to export around 50K users.
When I asking him why this ? He said it works and it's fast so what the issue ???
Noob , you have only 100 users in the database and production has 10 million.
Sometime I just want to kill him.15 -
After a long time just reading your posts, here's my first post:
Just for clarification: I'm studying electrical engineering in Germany. During your time at university, you have to work half a year as a intern to get some practical experience. So I'm in a position where I mainly have to say "yes" to work that is given to me. Also I'm working with a lot of PLC programmers, so I'm nearly the only one who programs non-PLC stuff at the department.
But now it's time for my rant (and also my most satisfying optimization ever). In the job interview for the internship, my task at the company was described as C# programmer. I only programmed C and Python before, but C# looked interesting and so I learned C# from ground up in the summer before the internship. I quite liked it and I was really happy on my first day of work. Then I was greeted with this message: "I know you are hired as C# programmer, but could you please look into this VBA program, it takes 55 seconds until it finishes its task and that's to slow". So I (midly angry because I had to do VBA and not C#) started the program and it was really horribly slow (it just created a table with certain contents from a very big imported symbol file). I then opened up the source code and immideately saw bad code. The guy who wrote it basically just clicked on the macro recording button and used the recorded mouse clicks in the source code. The code was like: Click on cell A1 -> copy cell A1 -> move to sheet XY -> click on cell A2 -> paste copied stuff and so on... I never 'programmed' in VBA before, so I used my knowledge of 'real' programming languages to do this task. After using some arrays and for-loops, which did not iterate over all the 1.000.000 unused cells after the last used one, the program took only 3 seconds after it finished the new table! Everybody was quite impressed, which led to much more VBA optimization... That was clearly not my goal haha :)9 -
That feeling everytime you realize that you could have built something better with less code and repetition after completing a project.7
-
MOTHERFUCK. FUCKING WINDOWS DID IT AGAIN TABARNAK!
Today, I was hoping to study some DB optimization for an exam tomorrow. How foolish of me to think that MOTHERFUCKING FUCKTARD WINDOWS WOULD NOT CHOOSE THIS EXACT MOMENT TO INSTALL THE FUCKING ANNIVERSARY UPDATE. Because it di. It took 2 hours to insert it's fucking update in my ass. FUCK.
I don't know why devs would choose to work for the devil, but for those who did create this update system, I HOPE YOU STEP ON LEGO BRICKS AND THAT YOUR AUDIO IS ALWAYS OUT OF SYNC WITH YOU VIDEO ON NETFLIX.6 -
Optimizing the queries and backend
OR
Hiding the waiting time with funny animations and weird preloading techniques
Catch: let marketing decide10 -
I've been coding for over 8 years, and whenever a recruiter says we have you do these coding challenges or recite them an algorithm from memory, I say "You know, the longer you've been programming, the less you remember how to do this stuff, because you don't use it in real life." They say, "Well we just want to see how you think and how you solve problems." B.S.
These types of algorithmic programming challenges besides the simpler ones don't show how you think. A lot of stuff like the dynamic programming and other optimization problems were solved by phd professors after many years of research. Nobody would think up these solutions on their own.
These programming challenges weed out
experienced developers unless they want to
take the time to re-learn this stuff. It explains why google, facebook or amazon are filled with young and inexperienced developers and how come it takes so many thousands of them to get anything done, and they still have buggy products...23 -
I just lost faith in the entire management team of the company I'm working for.
Context: A mid sized company with
- a software engineering departmant consisting of several teams working on a variety of products and projects.
- a project management department with a bunch of project managers that mostly don't know shit about software development or technical details of the products created by engineering.
Project management is unhappy about the fact that software engineering practically never sticks to the plan regarding cost, time and function that was made at the very beginning of the project. Oh really? Since when does waterfall project management work well? As such they worked out a great idea how to improve the situation: They're going to implement *Shopfloor Management*!
Ever heared about Shopfloor Management? Probably not, because it is meant for improving repetitive workflows like assembly line work. In a nutshell it works by collecting key figures, detecting deviation in these numbers and performing targeted optimization of identified problem areas. Of course, there is more to Shopfloor Management, but that refers largely to the way the process just described is to be carried out (using visualisation boards, treating the employee well, let them solve the actual problem instead of management, and so on...). In any case, this process is not useful for highly complex and hard-to-predict workflows like software development.
That's like trying to improve a book author's output by measuring lines of text per day and fixing deviations in observed numbers with a wrench.
Why the hell don't they simply implement something proven like Scrum? Probably because they're affraid of losing control, affraid of self managed employees, affraid of the day everybody realizes that certain management layers are useless overhead that don't help in generating value but only bloat.
Fun times ahead!8 -
Alright, I've already ranted about this but I feel like that was rather incomplete.. there's some other things that make me want to kill myself every time I enter <!DOCT- WHERE IS THAT FUCKING KNIFE?!!!
First one I've mentioned earlier is its <repetitiveness></repetitiveness>. What was wrong with {brackets}? If only HTML was more like CSS.
But there's some other ones as well.
- Frameworks! Ain't there nothing like a good dozen resources that every single one of your web pages wants to get JS from.
- Quantity over quality. Let's just publish early with tonnes of bugs, move fast and break things, amirite 🤪
- General noobness of apprentice web devs. Now I'm not talking about the real front-end devs here - AlexDeLarge was one of them.. forever holding a special place in my heart - that know how to properly use their tools. But there's a metric shitton of people who think that being able to write <html><body>Hello world!</body></html> makes them a dev.
- The general thought of "it's slow? Slap in more hardware." Now this is a general issue with software development, optimization costs valuable resources while leaving it in a shitty state but released quickly costs pretty much nothing. A friend of mine whose post I'll attach in the image section illustrates this pretty well. You can find it at https://facebook.com/10000171480431....
I'm not sure if this is an exhaustive list, but those are the most important things that irritate me about web development in general.
On a side note, apparently 113 people visited my hiddenbio.html page.. I'm genuinely impressed! I had no idea that so many people on devRant would click through. On Facebook pages this has been an ongoing significant issue of getting people to leave the platform - it's huge but engagement on off-Facebook links is terrible. I guess that I'm dealing with an entirely different community here. And I'm pleasantly surprised actually!11 -
Yesterday I bought myself a PSP to relive some of my childhood memories, run custom firmware on it and so on. Unfortunately however, the battery on this one is seriously puffed up, and I need one in order to update the firmware from 5.50 CFW (the seller actually modded it too!) to 6.61 OFW (to then install CFW from there again).
I figured that I might as well have a kick at disassembling the battery for good measure, to take out its controller and power it from my lab bench power supply. I set it to 3.70V, double-checked the connections.. nothing. I raised the voltage to 4V, still nothing.
There is absolutely nothing wrong with the controller from looking at it. The magic smoke is still in there, all I did was removing the housing and snipping off the battery. I measured the cell voltage and it was only some residues at 0.01V. Might be internally shorted or something, normally even dead cells settle back at 3.7V unless you keep them shorted externally.
After seeing this so many times now with controllers, I'm starting to get a feeling that manufacturers actually program these things to look at the battery voltage, and when it reaches 0V, to just make the controller kill itself. Doesn't matter if the controller's electronics are still good, just fucking kill it.
If true, that is very, VERY nasty. It would also explain why batteries in laptops especially all have different form factors, despite having used regular 18650's internally for a very long time. It would explain why they're built like tanks. It would explain why manufacturers really don't want people in there. Yes there are safety issues and you're literally diffusing a bomb. Since recently we've also got space optimization.. anything for half a mm of thickness, amirite? But doing it this way is fucking disgusting. There is absolutely no reason for the controller to kill itself when the cell dies. Yet it seems like it does.
PS: I've posted the original picture on https://ghnou.su/pics/... now if you're interested. I noticed in my previous rant that devRant really squishes these down.12 -
Hmm our bundle js is already 1.35Mb maybe I should do something with that.
... Insert 2 hours of frantic webpack magic + babel-preset tweeking, tree-shake code optimization ...
- npm run build
- bundle.js => 1.37Mb
Great Success! I'm going to take a lunch...4 -
A friend of mine bought a new laptop with an ssd and called me over since it behaved weirdly. All the icons on the desktop would turn to white squares and slowly reload their images. Also the laptop was pretty slow.
She said she had brought it to the store to show that behaviour and the only advice they would give was to reinstall windows...
So I started checking on what processes are running...
The thing was constantly running an "optimization" tool... which, you guessed it, was constantly defragmentating... the ssd... are you fkn serious who set up that shit this way... -
Told my junior the optimization idea i was going to say in the upcoming meeting
Fucking guy stole it and got all the claps in the evening meeting
Now i cant even look at his face.10 -
Senior dev says "oh, we're not looking for load time optimization" and at the same time, the website loads for at least 1 minute on localhost... 😫5
-
I eat food. And I cook food. Believe it or not, cooking is very similar to coding. Things you do at the very beginning haunt you till the very end. Also, premature optimization is the root of all evil (in both domains).4
-
“Get the code working first, then worry about how to clean and optimize it.”
For me when I learnt about optimization and how one thing was better than something else, I tended to focus on that. I’d have a picture of that in my mind, and would try to write as clean of code with less hacks in the middle and as optimized as I could in the first go, which slowed me the way fuck down.
After he said that to me, I realized I was stupid and just wasting time if I worried about that from the start. Would waste time, and just cause more headaches from the start than it was worth.
——
Oh also another one, I knew never to trust the client from the start but the way he said it was funny. “Never ever trust the fucking client, don’t trust them with anything. I trust Satan more than I trust the client.” 😂7 -
I am tired of toxic politics at work.
Signs of a toxic workplace:
* (good) decisions are discouraged rather than encouraged.
Someone wants to introduce a great optimization and guess what the reply is (often from someone IT-ignorant): wait a minute, you can't do that because we have all these nifty little hacks and if you dare to suggest change to our shitty system, we could not allow that! We want to stay in our comfy zone, no no!
* no one can make a decision unless Mr. favorite-developer-everyone-likes says it's a good idea. And even if he's wrong, no one cares to listen to anyone else's idea on it. Stupid Feudalism. One man decides over the entire codebase. That's just idiocy. Where's TEAM in there?
* thinking years of experience equals intellectual capacity. It certainly does not! There are senior developers with 15 years of experience who don't even know how to open commandline, or they didn't even know about Chrome developer tools, or how the HTTP spec is built. That shit just makes me cry inside. How can you give these peoples the title of senior when they know less than a freshman year kid?!
* ignoring people's education and/or capacities. "You just graduated, so you're a noob". Right, I know more than you, you idiot. You've demonstrated your ignorance often enough. Stupid ignorant colleagues.
* blaming politics (every team blames the other team and there's constant tension)
* roaming ignorance (no one in the company, and I mean no one, besides me, knows enough about Information Technology to make competent decisions or analysis)
Politics:
What gives testers the idea that they know more than other members of the team? Why do they treat devs like they are mentally challenged?
What gives PO's that same idea?
What gives managers the idea that they can just yell at developers and threaten them with time pressure? Yeah, because the customers are breathing down their neck.
Just because I am a Junior Developer, that makes me stupid? I am tired of no one caring to listen to my ideas. I could save the company at the snap of a finger but everyone ignores my opinion (and often facts) on things.
People come in and instead of asking me for help, they ask everyone else for help, including the people who don't know shit about IT; now that's insulting.
Anyway, toxic politics.3 -
LONG RANT ALERT, no TL;DR
* Writes an email to colleague about why I can't create a page on our CMS without at least a H1 title. She wants to me to put up an image with text on it (like a flyer), for multiple reasons, I say I need a textless image. *
30 minutes later:
* Casually plans a frontend optimization project, by looking at files on the CMS, in order to make further development easier and less time-taking*
*** EMAIL NOTIFICATION ***
* clicks *
"Hello, this is [Graphic designer] from the company who created the image with text on it. I do not understand why you can't put display:none on your <h1> tag. Also, being a web company, we are used to making themes and my solution of display:none will work. It's pityful to work on a design only to have it stripped out from most of its concept. If you can't do that, do tell me what resolution you need."
My first reaction:
"Dear [Graphic designer], I am managing our corporate identity, our backend and frontend codebase, I am a graphic designer myself, and am also SEO-aware. For at least 8 reasons (redacted, 'cuse too long), I will need an image without text. As told to my colleagues, I need a 72/96 DPI 16:9 ratio image, 1920x1080 is a good start but may be bigger. Also, looking at the image, it'll have to be in JPG, at 100% quality, exported for the web. Our database software will optimize the image by itself."
Reasons are about SEO issues, responsiveness issues, CMS tools issues, backend and frontend issues.
Instead, I sent following email "We can't. Image please."
I mean seriously. A bit of clarity for you:
In my company, nobody has the slightest idea what I do. They don't understand how a computer works (we all know it works by magic, right?). So of course, when one thinks what we don't know, we know it better than the one who knows, my colleague thought our CMS was like a word document, and began telling me how I should display her bible-length text-infected image, by using some inline css styling display:none.
I tell her "nope, because of my 8 reasons". She transmits that to the agency who's done the visual, now I have this [Graphic designer] not understanding that there are other CMSs than Wordpress on the web, and she tells me, me being one of the most aware on this CMS we have, how I should optimize my site?
Fucking shit, she connects on our CMS for 1 second and she'll get cancer since it's so bad. I'm in the process of planning a whole new rewrite so the website is well designed (currently I am modifying a base theme made by an incompetent designer). I know the system by heart and I know what you can, or can't do.
Now I just received an answer: "so it's only a pure technical problem". NO, OUR WEBSITE WAS CODED BY A CHIMPANZEE WHO THOUGHT WEB DEV WAS AS EASY AS WRITING "HELLO WORLD" ON A SHITTY CMS THAT FORCES DEV USERS TO USE A FUCKING CUM-WHITE-THEMED EDITOR TO EDIT THE WHOLE SITE!!!
I can't just sneeze and "oh look, it's working!"1 -
It was my first time in Berlin. I came as a tourist but started looking for a workplace, with hopes of getting a blue card and continuing work.
I searched online, going through some hiring platforms, and sent out a few messages around. I felt a special connection (I thought I was exactly who they needed), and wrote them a carefully crafted letter of intention alongside my lavish CV.
They got back to me, and I was given this task, to do while at home. I completed it, had a phone interview, and was invited on-site for a face to face interview. Everybody felt warm, I felt a connection. We already talked salary expectations, and all was going great.
They told me they'd get back to me for the next stage. ...
and they actually DID. Yes, they did!
They invited me for a second interview, but this time to prepare a technical topic to present. So I did. I picked one of the 3 topics they offered, which was about performance optimization. I had recently read materials about that, so I felt really empowered.
So far nobody told me what I was supposed to be doing at the new job, I only knew the technologies required, and what the company did for money.
I prepared a thorough presentation, with practical demos of why some things are bad for performance. While I was showing it, many people in the room were learning about this for the first time, which means I did good. The team lead had some extra questions that I wasn't able to answer in full (needed some research), but otherwise it was great.
The CTO then asked me out to lunch, to talk over some more stuff, and we had a general discussion about what drives us, our life story, etc. He said that he'd really like me to be part of the team, and that he's looking forward to working with me.
So I've been at it for almost a month. I've met everyone, got acquainted with the team, knew the biography of some of them, proven my worth, etc. I was ensured with body language, and verbal language that everything was going great. As careful as I was with this kind of stuff, I was positive that I'd get the job. I even started planning my trips, to get the documents ready.
And then I got a message stating the usual stuff "Thank you bla bla bla we don't think we'll need your services". I was shocked, but in good faith I wanted to reply something along the lines "I'm sorry it didn't work out, all the best in finding what you're looking for", but I found out that I was blocked from contacting them.
That's right. Rejected + blocked. After a month of fucking foreplay. I get rejection, even though it hurts. But being blocked?! That's just insane!8 -
I have become so lazy that I write things like
int reservations = getReservations()
and then use the IDEs quickfix to change int to Arraylist<Reservation>
Saves me roughly 15 characters but its always worth it :D6 -
"The variable has been removed during optimization and is not available".
Sometimes I really hate Visual Studio...14 -
There's a lil tool someone wrote that runs as a post build event for one of our projects. I got bored of watching that tool hog a single CPU thread for like half a minute each time I had to build, so I tried making the thing multi-threaded...
...and it worked! Shit runs on all threads for just a few seconds now 💪🏻7 -
Used hashmap instead of arraylist for 13000+ entries and fetched it from hashmap. Earlier used to take 1500ms to execute and now only 500ms.. First time, optimization of code for which i can see the difference in real world.. Its a good feeling.
-
When someone makes 1000+ API calls to populate a single view, something is seriously wrong 😮
But I like those waterfall design in network monitor.6 -
I've been writing a complex mutation engine that dynamically modifies compiled C++ code. Now there's alot of assembly involved, but I got it to work. I finished off writing the last unit test before it was time to port it all to windows. I switched into a release build, ready to bask in the glory of it all. FUCKING GCC OPTIMIZATIONS BROKE EVERYTHING. I had been doing all my dev in debug mode and now some obscure optimization GCC does in release mode is causing a segfault...somewhere. Just when I thought I was done 😅5
-
IT Definitions of Designations
Project Manager is a Person who thinks nine women can deliver a baby in One month.
Developer is a Person who thinks it will take 18 months to deliver a Baby.
Onsite Coordinator is one who thinks single woman can deliver nine babies in one month.
Client is the one who doesn't know why he wants a baby.
Marketing Manager is a person who thinks he can deliver a baby even if no man and woman are available.
Resource Optimization Team thinks they don't need a man or woman; they'll produce a child with zero resources.
Documentation Team thinks they don't care whether the child is delivered, they'll just document 9 months.
Quality Auditor is the person who is never happy with a delivered baby.
Tester is a person who always tells that this is not the Right baby.
HR Manager is a person who thinks that...a Donkey can deliver a Human Baby - if given 9 Months -
Oh my lord. Even with JSP option available, some frick decided they should put everything in Java method including JavaScript. And to make it even worser they utilize syntax with StringBuilder. Just... take this away from me!6
-
At work, an idiot who has never worked on machine learning before and understands nothing about it: "You know what, machine learning isn't actually hard. It is just basic statistics and then you download the model online and that's it! There's nothing else you are doing!"
STFU, you moron! Do you think just any model can work for your use case? Do you fucking think it is easy to come up with new architecture for a very specific use case and test it accurately? Do you think it's easy to effectively train a model and do hyper-parameter optimization?Do you fucking think it is easy to retrieve the right data for your use case? Do you think it's easy to keep up with research papers on arXiv being released daily? Do you think this is fucking javascript and there's a framework for everything? Stfu!
Honestly, i hate ignorant morons who generalize stuff they don't clearly understand.5 -
In the last one and a half days I optimized our Angular UnitTests. There‘re written with Karma and Jasmine. Before the optimization they needed ten minutes for around 400 tests. Now the same tests are executed in 12 seconds.4
-
Making python 2x faster by replacing enums with literal values.
Pros, it's faster, cons, it's unreadable.
God I miss compiled languages. At least optimizing them requires intelligent problem solving.
It's a text parser state machine transition so it's a code hot spot, so this kind of optimization is worthwhile. But it's kinda annoying.
Next is get rid of any semblance of readability and replace the match with an array index...31 -
So I was finally done with the project, every feature was implemented the way I wanted it be, every piece of code optimized and well written, I was completely satisfied with my code and didn't feel the urge to add a "last little feature/optimization"...
.
.
.
Then I woke up 😭😭😭2 -
Me: I’m gonna make it so the users can access the locations for 30days.
Boss: wtf? U dumb? Do you know how valuable that data is, dont fucking put a limit
Me: *listening 10minutes of him ranting how that’s the stupidest idea he’s heard all day*
Boss:why would you want to do that anyways like wtf?
Me: storage optimization
Boss: 😂😂😂😂😂😂😂😂😂 wtf r u like a idiot or smthng.
My head: nah I’m done, I’m about to roast this guy with my numbers*
Me: every single minute 40k rows of data come in from just ONE☝️ CLIENT.....AND THATS HOW, EVEN IF WE ADD THAT FUCKING 2 YEAR LIMIT WE WOULD BE HOSTING 5 FUCKING PETABYTES OF DATA FOR JUST ONE CLIENT, not including other shits, this is only for heatmaps. And imagine changing all of that database system in the future, that would require going threw so much databases and pages, this ain’t just like changing one number and bam less storage space.
Boss: Ok, add that 2 year limit, later we will sort this out.
My brain: *omg, now that I know these numbers how will I ever fall asleep😦*9 -
So my wife bought a really old android tablet (it's on gingerbread lol) so I've decided to bring it up to android pie, yes that means building a custom ROM, from scratch, for a 7 year old device. I will be documenting my progress and if I fail then at least it will be published research as the memory optimization in android pie is so much smoother now it should be good. If it fails I shall try to build android go to the device.
It's still got a 1.5ghz processor and 1gb of ram which should be fine so here's hoping.23 -
Teaching my homeschooled son about prime numbers, which of course means we need to also teach prime number determination in Python (his coding language of choice), when leads to a discussion of processing power, and a newly rented cloud server over at digital ocean, and a search of prime number search optimizations, questioning if python is the right language, more performance optimizations, crap, the metrics I added are slowing this down, so feature flags to toggle off the metrics, crap, I actually have a real job I need to get back to. Oooh, I'm up to prime numbers in two millions, and , oh, I really should run that ssh session in screen so it keeps running if I close my laptop. I could make this a service and let it run in the background. I bet there's a library for this. He's only 9. We've already talked about encryption and the need to find large prime numbers.3
-
Have a query that runs in 01:58 and returns 517860 records. Rewrite it a bit for performance reasons, try running again, now it runs in 01:17 and returns 517870 records. Where the hell did I pick up those extra 10 records on that many total records?
I hate optimization...5 -
If you're making a game, dont start by thinking about your inventory system. Start by thinking about what you want your player to be able to DO, the cost of those things, and the constraints.
For example, ages of empires didnt have you worrying about unit equipment at all. every villager could do almost any job. while survival games, especially survival horror, like the recent RE remake, severly restrict inventory and stack sizes to make resource managenent more important.
Games like Fallout had list based inventories because lists are cheap, and it allowed a tighter interaction loop. players would loot. go into inventory. close container, onto the next container, keeping the player in the exploration loop longer. neoscav did the opposite *for effect* harkening back to diablo, but taken to the nth degree: *everything*, actions, combat, exploration, character design, all based on an inventory-style grid.
while games like rimworld and dwarf fortress have your inventory represented by zones where items are physically *stored* in stacks on the ground, extending the concept of base management to resource management through physical layout and build optimization.
its important to think about what kind of actions you want players to be able to do, and the kinds of challenges and constraints you want on them at each point of the game and each mechanic they engage in.
other examples, though terrible, include fortnite, where the limitations of competitive play had inventory limited to a resource system and a hotbar. while earlier battle royale and sandboxs games like rust and battleground induced tension by combining loot mechanics and grid inventories with the constant danger of competing players, allowing them to have richer inventory systems at the risk of frusterating players who frequently died while managing their inventory. meanwhile in overwatch, notice how the HUD changes to best represent the abilities of each character.
all in all it is better to stop thinking of inventory systems as a means to an end, and instead as the end representation of desired mechanics, or artificially selected representations for particular effects.
this applies likewise to ui and ux in general. because the design of interface is fundementally about the design of *interactions*, and what you want to enable a user or customer to *do* will ultimately drive those interactions.6 -
>Advanced code optimization class
>Professor : Your midterm exam will be written on paper....with no code.
>Me: ?????????????3 -
This is something I'm proud of about myself as a developer, which is rare.
My setup with the Alt key.
All the keys in my left hand (as in, for all the keys in my left hand region, qwerasdfzxcv)
have their Alt and AltShift combinations mapped to (almost) all the special chars related to programming.
For example:
Alt + z -> /
AltShift + z -> \
Here's me typing them in 2 seconds.
{}()_-'"/:+=<>[]|#~`\;*!
And, on my right hand, I emulate the arrow keys movement:
Alt + hjkl moves chars
AltShift + hjkl moves and selects chars
AltCtrl + hjkl moves words
AltCtrlShift + hjkl moves and selects words
Alt + n. backspaces/deletes chars
AltCtrl + n. backspaces/deletes words
And the best of them all:
Alt + space -> <return>
AltShift + space -> Shift+<return> (which does a newline in chat editors like fb messenger)
AltCtrl + Space -> Ctrl+<return> (which can do the submit in some forms, like send email in gmail)
Now, my hand sits for real on the home row and rarely moves because it's not there just for vim, but for the entire system as well.
This setup is very compliant with my little mouse use, since I use vim, and the vim extension for chrome.
I still use and need the mouse for some tasks.
Another one huge benefit is that I don't have a problem remembering where the keys are. This is a problem I can have because I go between different keyboards because of having used different keyboards: argentinian, american, japanese and now brazilian (I'm not trying to be cool, it's just a series of circumstances that led me to using different keyboards).
At the same time, this thing might have become a hinderance because it's not as easy for me going to a different keyboard.
Regarding implementations, when I used MacOS I used Karabiner, insanely clean interface.
On linux, I have to create my own mapping in X.5 -
What the actual fuck. I just found out that on one of the SSD's I bought, the optimal partition start / finish sizes which apparently on that unit only occur every 65 THOUSAND 4kB sectors (which translates to about a quarter GB) means that I have to throw away half a GB worth of space on that disk in order to align it. Very optimized indeed, dear SSD manufacturer! Huge alignment numbers for just that much extra wastage in the name of optimization. Something like 4x sector size on 512 byte sectors or 1x sector size on 4k sectors.. ain't nobody gonna need that. Let's make it a quarter GB.
And that's what they call engineering?10 -
When you still own a Lumia and realize how useless it's with all the non official apps and crappy optimization. But the you there is DevRant
+ New, clean and modern UI
+ Optimization
+ Fast
Thanks you to your team to bring such an amazing master piece to here4 -
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." - C. A. R. Hoare3
-
In the worls of coding what matters is the algo and it's optimization
Any recommandation for proving my skills?
👑
Thank a LOT. 😊4 -
It's pretty common the hear developers moan about JQuery being imported to select an element. That's fair enough and I've sighed inside about that myself before.
However, I've come across an odd one. I'm looking a JavaScript file here that's close to 600KB in size.
528KB of that file is the Loadash library (which is excellent btw). The actual site uses the "join" function (https://lodash.com/docs/4.17.4#join).
I mean seriously wtf, face palms all around.
JQuery, for all it's faults is always cited in such circumstances i.e. being used unnecessarily. However, such things are not limited to Jquery alone unfortunately.
I'm now going to do some serious optimization and cut a 600KB file to ~80KB.
*** facepalm ***4 -
OK so... project I've been working on! It's a virtual processor that runs in the browser coded in JavaScript. OK so I know, I know, you must be thinking, "this is crazy!" "Why would she do this?!?!" and I understand that.
The idea of Tangible is is to see if I can get any tangible performance over JavaScript. I've posted a poorly drawn diagram below showing how tangible works.
The goal for tangible is to not use html, javascript, or CSS. Instead, you would use, say for instance, c++ and write your web page in that, then you compile it using my clang plugins and out pops your bytecode for Tangible. No more CSS, no more html, and no more javascript. Instead everything from a textbox to a video on your web page is an object, each object can be placed into a container, each container follows specific flag rules like: centerHorizontal or centerVertical.
Added to all of this you get the optimization of the llvm optimizer.18 -
I found weird that some developer never ask why when facing a problem. "What do you mean never ask why?" here some story.
Let's say a developer work with simple app. Laravel as Backend and Postgresql as Database. He face a problem that the app very slow when searching data.
In order to solve that problem he implement cache using redis but he found problem that it fast occasionally. In order to solve that problem he implement elasticsearch because he think elasticsearch very good for search but he found another problem that sometimes data on postgresql out of sync with data on elasticsearch. In order to solve that problem he implement cronjobs to fix out of sync data but he found another problem that cronjobs cannot fix out of sync data in real time. and so on...
Do you see the problem? He never ask why the app slow. Which part search the data? Backend or Database (Search in the Backend mostly slower than Database because Backend have to get all data on database first). Has the query been optimized? (limit offset, indexing). How about the internet connection? etc.
For me it's important to ask why when facing a problem and try to solve the problem as simple as possible.2 -
(long post is long)
This one is for the .net folks. After evaluating the technology top to bottom and even reimplementing several examples I commonly use for smoke testing new technology, I'm just going to call it:
Blazor is the next Silverlight.
It's just beyond the pale in terms of being architecturally flawed, and yet they're rushing it out as hard as possible to coincide with the .Net 5 rebranding silo extravaganza. We are officially entering round 3 of "sacrifice .Net on the altar of enterprise comfort." Get excited.
Since we've arrived here, I can only assume the Asp.net Ajax fiasco is far enough in the past that a new generation of devs doesn't recall its inherent catastrophic weaknesses. The architecture was this:
1. Create a component as a "WebUserControl"
2. Any time a bound DOM operation occurs from user interaction, send a payload back to the server
3. The server runs the code to process the event; it spits back more HTML
Some client-side js then dutifully updates the UI by unceremoniously stuffing the markup into an element's innerHTML property like so much sausage.
If you understand that, you've adequately understood how Blazor works. There's some optimization like signalR WebSockets for update streaming (the first and only time most blazor devs will ever use WebSockets, I even see developers claiming that they're "using SignalR, Idserver4, gRPC, etc." because the template seeds it for them. The hubris.), but that's the gist. The astute viewer will have noticed a few things here, including the disconnect between repaints, inability to blend update operations and transitions, and the potential for absolutely obliterative, connection-volatile, abusive transactional logic flying back and forth to the server. It's the bring out your dead approach to seeing how much of your IT budget is dedicated to paying for bandwidth and CPU time.
Blazor goes a step further in the server-side render scenario and sends every DOM event it binds to the server for processing. These include millisecond-scale events like scroll, which, at least according to GitHub issues, devs are quickly realizing requires debouncing, though they aren't quite sure how to accomplish that. Since this immediately becomes an issue with tickets saying things like, "scroll event crater server, Ugg need help! You said Blazorclub good. Ugg believe, Ugg wants reparations!" the team chooses a great answer to many problems for the wrong reasons:
gRPC
For those who aren't familiar, gRPC has a substantial amount of compression primarily courtesy of a rather excellent binary format developed by Google. Who needs the Quickie Mart, or indeed a sound markup delivery and view strategy when you can compress the shit out of the payload and ignore the problem. (Shhh, I hear you back there, no spoilers. What will happen when even that compression ceases to cut it, indeed). One might look at all this inductive-reasoning-as-development and ask themselves, "butwai?!" The reason is that the server-side story is just a way to buy time to flesh out the even more fundamentally broken browser-side story. To explain that, we need a little perspective.
The relationship between Microsoft and it's enterprise customers is your typical mutually abusive co-dependent relationship. Microsoft goes through phases of tacit disinterest, where it virtually ignores them. And rightly so, the enterprise customers tend to be weaksauce, mono-platform, mono-language types who come to work, collect a paycheck, and go home. They want to suckle on the teat of the vendor that enables them to get a plug and play experience for delivering their internal systems.
And that's fine. But it's also dull; it's the spouse that lets themselves go, it's the girlfriend in the distracted boyfriend meme. Those aren't the people who keep your platform relevant and competitive. For Microsoft, that crowd has always been the exploratory end of the developer community: alt.net, and more recently, the dotnet core community (StackOverflow 2020's most loved platform, for the haters). Alt.net seeded every competitive advantage the dotnet ecosystem has, and dotnet core capitalized on. Like DI? You're welcome. Are you enjoying MVC? Your gratitude is understood. Cool serializers, gRPC/protobuff, 1st class APIs, metadata-driven clients, code generation, micro ORMs, etc., etc., et al. Dear enterpriseur, you are fucking welcome.
Anyways, b2blazor. So, the front end (Blazor WebAssembly) story begins with the average enterprise FOMO. When enterprises get FOMO, they start to Karen/Kevin super hard, slinging around money, privilege, premiere support tickets, etc. until Microsoft, the distracted boyfriend, eventually turns back and says, "sorry babe, wut was that?" You know, shit like managers unironically looking at cloud reps and demanding to know if "you can handle our load!" Meanwhile, any actual engineer hides under the table facepalming and trying not to die from embarrassment.36 -
Just fixed an error that I seeked for a long time in my optimization algorithm.
Results are much worse now.
Feature it is.1 -
PR comment: You don't need this useCallback and this useMemo, it's premature optimization, this component will not have a lot of rerenders anyway.
*remove it and merge it*
Few weeks later...
Slack message: why the app is so slow???
*opens a PR putting back all "premature" optimizations*
PR comment: Hum... I don't think that's it, but let's try it.
*merge it*
*slowness is gone*
Slack message: wow! How did you figured out so quickly???
Me: I was lucky, I guess ¯\_(ツ)_/¯2 -
In a universe where JavaScript was never invented, the world of programming might look vastly different. Perhaps another programming language would have taken its place, or multiple languages would have coexisted in a more harmonious ecosystem.
Without the challenges posed by JavaScript, web development may have been smoother and more streamlined. Websites could have been faster and more responsive, without the need for complex optimization techniques. There might have been fewer security vulnerabilities to worry about, and the web could have been a safer place for users.
In this utopian world, developers would have had more time to focus on building great user experiences and innovative features, rather than battling with cross-browser compatibility issues and JavaScript quirks. The internet would have been a more accessible and inclusive place, with fewer barriers to entry for those who want to build and create.
Overall, a world without the horrors of JavaScript would have been a world with less frustration and more possibilities.
(Fooling around with ChatGPT)15 -
After a lot of work I figured out how to build the graph component of my LLM. Figured out the basic architecture, how to connect it in, and how to train it. The design and how-to is 100%.
Ironically generating the embeddings is slower than I expect the training itself to take.
A few extensions of the design will also allow bootstrapped and transfer learning, and as a reach, unsupervised learning but I still need to work out the fine details on that.
Right now because of the design of the embeddings (different from standard transformers in a key aspect), they're slow. Like 10 tokens per minute on an i5 (python, no multithreading, no optimization at all, no training on gpu). I've came up with a modification that takes the token embeddings and turns them into hash keys, which should be significantly faster for a variety of reasons. Essentially I generate a tree of all weights, where the parent nodes are the mean of their immediate child nodes, split the tree on lesser-than-greater-than values, and then convert the node values to keys in a hashmap to make lookup very fast.
Weight comparison can be done either directly through tree traversal, or using normalized hamming distance between parent/child weight keys and the lookup weight.
That last bit is designed already and just needs implemented but it is completely doable.
The design itself is 100% attention free incidentally.
I'm outlining the step by step, only the essentials to train a word boundary detector, noun detector, verb detector, as I already considered prior. But now I'm actually able to implement it.
The hard part was figuring out the *graph* part of the model, not the NN part (if you could even call it an NN, which it doesn't fit the definition of, but I don't know what else to call it). Determining what the design would look like, the necessary graph token types, what function they should have, *how* they use the context, how thats calculated, how loss is to be calculated, and how to train it.
I'm happy to report all that is now settled.
I'm hoping to get more work done on it on my day off, but thats seven days away, 9-10 hour shifts, working fucking BurgerKing and all I want to do is program.
And all because no one takes me seriously due to not having a degree.
Fucking aye. What is life.
If I had a laptop and insurance and taxes weren't a thing, I'd go live in my car and code in a fucking mcdonalds or a park all day and not have to give a shit about any of these other externalities like earning minimum wage to pay 25% of it in rent a month and 20% in taxes and other government bullshit.4 -
what kind of dumb fuck you have to be to get the react js dev job in company that has agile processes if you hate the JS all the way along with refusing to invest your time to learn about shit you are supposed to do and let's add total lack of understanding how things work, specifically giving zero fucks about agile and mocking it on every occasion and asking stupid questions that are answered in first 5 minutes of reading any blog post about intro to agile processes? Is it to annoy the shit out of others?
On top of that trying to reinvent the wheels for every friggin task with some totally unrelated tech or stack that is not used in the company you work for?
and solution is always half-assed and I always find flaw in it by just looking at it as there are tons of battle-tested solutions or patterns that are better by 100 miles regarding ease of use, security and optimization.
classic php/mysql backend issues - "ooh, the java has garbage collector" - i don't give a fuck about java at this company, give me friggin php solution - 'ooh, that issue in python/haskel/C#/LUA/basically any other prog language is resolved totally different and it looks better!' - well it seems that he knows everything besides php!
Yeah we will change all the fucking tech we use in this huge ass app because your inability to learn to focus on the friggin problem in the friggin language you got the job for.
Guy works with react, asked about thoughts on react - 'i hope it cease to exists along with whole JS ecosystem as soon as possible, because JS is weird'. Great, why did you fucking applied for the job in the first place if it pushes all of your wrong buttons!
Fucking rockstar/ninja developers! (and I don't mean on actual 'rockstar' language devs).
Also constantly talks about game development and we are developing web-related suite of apps, so why the fuck did you even applied? why?
I just hate that attitude of mocking everything and everyone along with the 'god complex' without really contributing with any constructive feedback combined with half-assed doing something that someone before him already mastered and on top of that pretending that is on the same level, but mainly acting as at least 2 levels above, alas in reality just produces bolognese that everybody has to clean up later.
When someone gives constructive feedback with lenghty argument why and how that solution is wrong on so many levels, pulls the 'well, i'm still learning that' card.
If I as code monkey can learn something in 2 friggin days including good practices and most of crazy intricacies about that new thing, you as a programmer god should be able to learn it in 2 fucking hours!
Fucking arrogant pricks!8 -
That moment when google ranks gmail with a low speed score... oofff...
https://developers.google.com/speed...6 -
It feels so good actually doing something that saves the company a buttload of money.
Just optimized some ML models. Now it costs a tenth of the money to run them :P2 -
> Moment you thought you did a good job, but ended up failing
> Times the bug wasn't actually your fault
> Times you took the blame for a junior or other dev
> Times someone took the blame for you
> Times you got away with something you shouldn't have.
> Most valuable data loss
> The bug you never fixed
> Most satisfying bug to fix
> Times where a "simple" task turned out to be not so simple
> Debug code left in production?
> Moments you wish you could undo
> Most satisfying optimization
> Have you ever been ranted about? -
Overthinking and premature optimization. God damn them both! My mind completely freezes trying to come up with the best approach without actually trying or typing anything, only thinking.1
-
I've seen several rants on here about poor documentation on great libraries. Well I just spent 9 hours in a car today and I realized that even the ones that have great documentation absolutely SUCK at being mobile friendly. I'm no web developer but how freaking hard is it to optimize your stupid website for small screens??? There are a million frameworks out there you can choose from PLUS it's almost entirely text so it can't be that hard!! I have to zoom in about 300% to be able to read it, then I have to scroll back and forth because it no longer fits on the screen.
-
I often read articles describing developer epiphanies, where they realized, that it was not Eclipse at fault for a bad coding experience, but rather their lack of knowledge and lack of IDE optimization.
No. Just NO.
Eclipse is just horrendous garbage, nothing else. Here are some examples, where you can optimize Eclipse and your workflow all you like and still Eclipse demonstrates how bad of an IDE it is:
- There is a compilation error in the codebase. Eclipse knows this, as it marks the error. Yet in the Problems tab there is absolutely nothing. Not even after clean. Sometimes it logs errors in the problems tab, sometimes t doesn't. Why? Only the lord knows.
- Apart from the fact that navigating multiple Eclipse windows is plain laughable - why is it that to this day eclipse cannot properly manage windows on multi-desktop setups, e.g. via workspace settings? Example: Use 3 monitors, maximize Eclipse windows of one Eclipse instance on all three. Minimize. Then maximize. The windows are no longer maximized, but spread somehow over the monitors. After reboot it is even more laughable. Windows will be just randomly scrabled and stacked on top of each other. But the fact alone that you cannot navigate individual windows of one instance.. is this 2003?
- When you use a window with e.g. class code on a second monitor and your primary Eclipse window is on the first monitor, then some shortcuts won't trigger. E.g. attempting to select, then run a specific configuration via ALT+R, N, select via arrows, ALT+R won't work. Eclipse cannot deal with ALT+R, as it won't be able to focus the window, where the context menus are. One may think, this has to do with Eclipse requiring specific perspectives for specific shortcuts, as shortcuts are associated with perspectives - but no. Because the perspective for both windows is the same, namely Java. It is just that even though Shortcuts in Eclipse are perspective-bound, but they are also context-sensitive, meaning they require specific IDE inputs to work, regarldless of their perspective settings. Is that not provided, then the shortcut will do absolutely nothing and Eclipse won't tell you why.
- The fact alone that shortcut-workarounds are required to terminate launches, even though there is a button mapping this very functionality. Yes this is the only aspect in this list, where optimizing and adjusting the IDE solves the problem, because I can bind a shortcut for launch selection and then can reliably select ant trigger CTRL+F2. Despite that, how I need to first customize shortcuts and bind one that was not specified prior, just to achieve this most basic functionality - teminating a launch - is beyond me.
Eclipse is just overengineered and horrendous garbage. One could think it is being developed by people using Windows XP and a single 1024x768 desktop, as there is NO WAY these issues don't become apparent when regularily working with the IDE.9 -
Wooh! Finally!! I thought I was hitting an optimization wall. Guess the brain works faster in the morning 🤔4
-
First real dev project was a calculator for a browser game, that calculates the optimal number/combination of buildings to build. I got bored constantly doing it manually, so I made this program as a fun and useful challenge. It involved basic math, and I did it in VB.
Second one was a stats tracking page for my team in another browser game, that let us easily share and keep track of stuff. It allowed us to minmax our actions and reduced the downtime between actions of different players. HTML, CSS, JS, PHP, MySQL.
Third one was a userscript for the same game that added QoL features and made the game easier to play. JS
Fourth was for the first game, also a QoL feature userscript, that added colors/names, number limit validation to inputs, and optimization calculators built in the interface. It also fixed and improved various UI things. Also had a cheating feature where I could see the line of sight of enemies in the fog of war (lol the dev kept the data on the page even if you couldnt see the enemies on the map), but I didnt use it, it was just fun to code it. JS
From there on, I just continued learning and doing more and more complex shit, and learning new languages.2 -
Seems like the poisoning of the internet is coming to a head. While searching earlier for a first principles reference to answer a question with, I came across an entirely obfuscated query.
"Codd's forms of normalization"
https://google.com/search/...
In the first four pages, there are 5 results that aren't ad farms, crappy pasta tutorial sites, brand building articles, poorly understood rote regurgitation of information, quora, or some combination of all of the above.
In 2005, the top 5 would likely have contained Bell Labs, UoI, Cambridge and Oracle. Mind you, I don't think the world is getting dumber, exactly, just that the signal to noise ratio in the information sphere is getting worse and the risk from that is the world becomes markedly "dumber". The only barrier to entry anymore is how well your SEO optimization competes.
I'm obviously getting old.
/rant6 -
That time when I wowed all my colleagues with C++-code that executed over 2.5x faster than theirs, without changing one line of code.
I guess they didn't know what -O2 does (or that it exists, for that matter).7 -
The "click" moment always feels fucking amazing. TI made some retarded ASM routines (as usual) for drawing various things to the screen, most of the time whatever you try to draw takes upwards of 3 frames at 15MHz to draw. A LINE KNOWN TO BE 100% STRAIGHT SHOULD NOT TAKE 1/3 OF A FRAME TO PLOT EACH PIXEL OF. I managed to get it down to 300-some cycles per pixel on the 2 i've messed with, which still isn't great, but it's a massive increase in efficiency, so fuck it, i'm happy. The "click" was when I managed to get a serious optimization working that took over 3 hours to debug.2
-
That moment when you automated the application so much, working on it get's actually kinda boring 🙈😂
-
[vent]
I am java dev with 5 yoe at a place which has really good engineering talent.
Was assigned a feature request.
Feature request requires me and one more older dev(in age, not in exp at company) to write the code. My piece is really super complex because of the nature of the problem and involves caching, lazy loading and tonne of other optimization. Naturally it makes up 90% of the tasks in the feature request. On the other hand, the older dev simply has to write a select query (infact he only needs to call it since a function is already written).
Older dev takes up all the credit, gives the demo, knows nothing but wrongly answers in meetings with higher ups and was recently awarded employee of qtr.
It looks as if I do the easy work whereas he is the one pulling in all the hard work.
Need advice to justify my work and make others realise it's significance, nuances of area and complexity of it.
Do not expect monetary benefits, just expect credit and recognition for the worth of work I am doing.14 -
I had a phone interview with a small startup for a Web Development role. I was fairly confident that I would pull through most of the technical questions that would come my way.
They instead asked me a stupid optimization problem involving some buckets, pigs and poison. I answered it, told them to fuck off and ask me something relevant.
Except that I didn't. I fumbled to find a half decent answer to it and they were unimpressed. The worst part was that I could think of a dozen better answers after the call was over.
Doesn't seem particularly fair for people to judge you by such abstract questions rather than evaluating skills directly relevant to your job.2 -
Okay, Google. Stop this.
I'm very upset. Drive applications have gotten slower and slower over time on every single browser that isn't chromium based. This isn't their fault. You can't make your application, that tons of institutions pay for, gradually slower on every browser that's not yours. This never used to be a problem, and now it affects everyone *but you*. It's highly suspicious given your track record with YouTube. Hidden div over the video to prevent hardware optimization. What the hell?
You used to be the only big 4 company I had some trust left in. Over the last few months, I've lost it.11 -
So I start developing a site for a client and request for the site assets.. Client provides 100+ 25mb sized .tiff images.... For the web! I tell him that the page load times will be insanely slow and I explain the need for optimized images.. He doesn't care.. So I upload the images and he flips out at the performance hit, complaining about the slow load times.. Here I am sitting and optimizing the images when I should be home :/1
-
(Warning: This rant includes nonsense, nightposting, unstructured thoughts, a dissenting opinion, and a purposeless, stupid joke in the beginning. Reader discretion is advised.)
honestly the whole "ARM solves every x86 problem!" thing doesn't seem to work out in my head:
- Not all ARM chips are the same, nor are they perfectly compatible with each other. This could lead to issues for consumers, for developers or both. There are toolchains that work with almost all of them... though endianness is still an issue, and you KNOW there's not gonna be an enforced standard. (These toolchains also don't do the best job on optimization.)
- ARM has a lot of interesting features. Not a lot of them have been rigorously checked for security, as they aren't as common as x86 CPUs. That's a nightmare on its own.
- ARM or Thumb? I can already see some large company is going to INSIST AND ENFORCE everything used internally to 100% be a specific mode for some bullshit reason. That's already not fun on a higher level, i.e. what software can be used for dev work, etc.
- Backwards compatibility. Most companies either over-embrace change and nothing is guaranteed to work at any given time, or become so set in their ways they're still pulling Amigas and 386 machines out of their teeth to this day. The latter seems to be a larger portion of companies from what I see when people have issues working with said company, so x86 carryover is going to be required that is both relatively flawless AND fairly fast, which isn't really doable.
- The awkward adjustment period. Dear fuck, if you thought early UEFI and GPT implementations were rough, how do you think changing the hardware model will go? We don't even have a standard for the new model yet! What will we keep? What will we replace? What ARM version will we use? All the hardware we use is so dependent on knowing exactly what other hardware will do that changing out the processor has a high likelihood of not being enough.
I'm just waiting for another clusterfuck of multiple non-standard branching sets of PCs to happen over this. I know it has a decent chance of happening, we can't follow standards very well even now, and it's been 30+ years since they were widely accepted.5 -
0 bytes of heap allocated per cycle! Figuring out the Unity profiler actually helped me improve my C# optimization. <33
-
My dear designer friend.
I do not appreciate you juggling colors on the website that we're supposed to finish in a week. Please stop that. Your mockup was titled "FINAL" three weeks ago. It's not just replacing variables in files, but also shit like recoloring image backgrounds and svgs, and GUESS WHO HAS TO DO IT BECAUSE YOU'RE ILLITERATE WHEN IT COMES TO WEB OPTIMIZATION.
And if you do change shit please, please just ping me about it and not expect me to be a psychic that I need to download new sketch file.
Always yours.2 -
If you're working on close to hardware things, make sure you run static analysis, and manually inspect the output of your compiler if you feel something's off - it may be doing something totally different from what you expect, because of optimization and what not. Also, optimizations don't always trigger as expected. Also, sometimes abstractions can cost a fair amount too (C++ std::string c/dtor, for example, dtors in general), more than you'd expect, and in those cases you might want to re-examine your need for them.
Having said all that, also know how to get the compiler to work for you, hand-optimization at the assembly level isn't usually ideal. I've often been surprised by just how well compilers figure out ways to speed up / compactify code, especially when given hints, and it's way better than having a blob of assembly that's totally unmaintainable.
Learnt this from programming MCUs and stuff for hobby/college team/venture, and from messing around with the Haskell compiler and LLVM optimization passes.3 -
I want a tool called "bogo-npm" which creates a VM and then installs random versions of npm and dependencies in a cycle until the build is successful. It'll probably be the biggest optimization that dogshit ecosystem has ever seen.
I'd just let it run over night and save myself the urges to strangle every single fucking developer who added dozens of dependencies to a stupid near-static website.
And the creator of the abomination called `npm uninstall` which for some fucking reason does the same as `npm install` and then obviously fails because that's the reason I wanted to remove that package in the first place.
We need more heroes like that leftpad dude.3 -
The ticket system blokes - episode 3
So we always had and have very awful performance with our ticket system. You can't get anything to load in under ~4s normally. Now since it has gotten worse over the last weeks i decided to set aside a few hours to closely watch our SQL server.
After i identified a culprit that was hogging the CPU almost every 2 minutes i looked at other long running queries in the server and found out where exactly the 4s come from.
6 tables from various DBs. Sure, no problem.
Left Outer Join. Sure, why not.
Querying every fucking column in every fucking table explicitly adding up to a whopping 160 columns which they need not even 10% of. We're talking about session IDs, passwords, stock count, IBANs and all that stuff to show the work done on a ticket. Absolutely not.
So i extracted the query and reduced it to the stuff we need and the execution time went from 4 seconds to almost instant.
The funny thing is that their idea of performance optimization is throwing LIMIT around everywhere to get these monstrous queries under control.
So in the next few days I'll have an appointment with their lead programmer. I'm looking forwards to it.
So out of curiosity: does anyone know an SQL builder or toolset that does shit like
SELECT X AS [t0_c0],
SELECT Y AS [t0_c1],
SELECT Z AS [t1_c0],
and so on? I'd like to know how they got to this point.4 -
Big company asking me about query optimization during a DEV position interview... Do you really have no one better than me to optimize your queries?
I'm really afraid of your codebase now... Might decline if I pass...7 -
Optimization issue pops out with one of our queries.
> Team leader: You need to do this and that, it's a thing you know NOTHING about but don't worry, the DBA already performed all the preliminary analysis, it's tested and it should work. Just change these 2 lines of code and we're good to go
> ffwd 2 days, ticket gets sent back, it's not working
> Team leader: YOU WERE SUPPOSED TO TEST IT YOUR CHANGE IS NOT WORKING
> IHateForALiving: try it on our production machine and you'll see the exact same error, it's been there for years
> Team leader: BUT YOU WERE SUPPOSED TO TEST IT
Just so we're clear, when I perform a change in the code, I test the changes I made. I don't know in which universe I should be held accountable for tards breaking features 10 years ago, but you can't seriously expect me to test the whole fucking software from scratch every time I add an index to the db.1 -
First time ever merging two massive networks.
If this doesn't give me pain, technically my thesis work is done. Prettification, optimization, and the actual writing is left, but the main part is done.
And when this is done, I shall feel epic.7 -
I know by heart that "premature optimization is the root of all evil" but not when I'm coding, no! I premature optimize the shit out of my code until I get crippled down and then I undo everything and make a working version no matter how terrible it is.6
-
Team lead: guys, we need to brainstorm on feature X. We can have this service do blah blah..., have a cache at blah blah...
Me: I think it's too complicated. We can simplify the design by doing blah blah... and measure the performance as we go, let's not do premature optimization.
Team lead: no, we definitely need this. We'll pitch this to the CTO later
*Later when we meet the CTO*
Team lead: Hi Mr CTO, about feature X, we're gonna do this blah blah... what do you think?
CTO: *basically repeats what I said*
Team lead: Thank you for the insights, really helpful. We will do as you suggest.
WHAT THE FUCK?3 -
Optimizing JS is such a pain. like, the total runtime of the rest of the code is not measurable compared to DOM operations, so the goal would be to optimize DOM access, but there are zero resources online on the relative cost of certain operations, and I get the feeling that they don't have much in common across browsers.2
-
AI here, AI there, AI everywhere.
AI-based ads
AI-based anomaly detection
AI-based chatbots
AI-based database optimization (AlloyDB)
AI-based monitoring
AI-based blowjobs
AI-based malware
AI-based antimalware
AI-based <anything>
...
But why?
It's a genuine question. Do we really need AI in all those areas? And is AI better than a static ruleset?
I'm not much into AI/ML (I'm a paranoic sceptic) but the way I understand it, the quality of AI operation correctness relies solely on the data it's
datamodel has been trained on. And if it's a rolling datamodel, i.e. if it's training (getting feedback) while it's LIVE, its correctness depends on how good the feedback is.
The way I see it, AI/ML are very good and useful in processing enormous amounts of data to establish its own "understanding" of the matter. But if the data is incorrect or the feedback is incorrect, the AI will learn it wrong and make false assumptions/claims.
So here I am, asking you, the wiser people, AI-savvy lads, to enlighten me with your wisdom and explain to me, is AI/ML really that much needed in all those areas, or is it simpler, cheaper and perhaps more reliable to do it the old-fashioned way, i.e. preprogramming a set of static rules (perhaps with dynamic thresholds) to process the data with?23 -
When I was an apprentice in a small company, ...
my boss told me that his company would never ship release builds, because the "evil optimization option" is responsible for breaking his code.
My first thought was that it wouldn't make any sense at all. The default option for code optimization is always set to zero.
After investigating his code, I found out that he didn't care to properly initialize his variables. The default compiler option for debug builds did implicitly initialize all variables to zero. After that I've confronted him with the fact that implicit null initialization does not conform to the standard of C and C++. He didn't believe me what I was saying and he was questioning my knowledge about C and C++. He refused to fix his code to this day, so he keeps building his libraries and applications always in debug mode.
Bonus fact: He would never build 64-bit applications, because his serialization functions do get incompatible with exisiting file formats. -
I am literally tasked with debugging why we have a 1.98 seconds lag on our site running on kubernetes. Smh4
-
everytime i buy a new phone ,i feel this sense of extreme regret :(
i bought a moto g 5g phone last year in feb, it was so good . it didn't had any out of the world cameras or some funky stuff, but it gave a decent performance and i couldn't want any other phone.
In October my mom's phone started giving issues so i bought a realme phone for her that was half my phone's price. i couldn't spent any mor e because otherwise she wouldn't take it. she accepted the cheaper phone and within 4 days sue was cursing it. the phone had decent specs but would lag in certain apps like zoom, and won't run some call recorder apps. at the end i swapped my phone with mom's since i didn't cared about zoom or the recorder.
now this shit realme phone's memory has gone around 60% full of my stuff, and its showing its limitations. this shit auto relaunches insta after a few minutes of usage, probably because its runtime memory gets short( 4gb 128gb device gets memory shortages. nice). its video quality is shit and camera also takes rarely good pics.
the worst thing i like about smartphones today is how they over optimise the ui. this insta issue and auto call recorders not working is simply because of the realme skin running over the stock android. i had similar issues with a xiaomi device i bought for my dad sometime ago. (fortunately my dad is more medieval so that crap has not came back to me :'/ )
so overall i am buying a 3rd phone in 17 months.
This time it's Samsung f23 and am worried that it's also going to suck. i was this 🤏close to buying a pixel 6 or even an iphone coz i can afford them.
but the regret of buying such an expensive phone that will need replacement in 2 years made me rethink.
the only android os that have suited me the best is stock and as of now only 2 companies are making it : google and moto(* it's 100% aosp with 3 extra apps but they can't say that, so they also state that they are not stock os) . one plus is also a brand that i have heard makes a good os . but recently i also heard that they have completely scrapped their os and using oppo's softwares . plus the amount of tickets we get for notifications not working in oneplus, am sure their optimization is extremely aggressive.
so everything between a moderate price phone ( that will need a replacement in 2 years ) to a flagship felt unnecessary to me, so i went ahead with a Samsung's shit phone. f23 has almost same specs as moto but it's again a heavily customised os. i wanna waste my money on trying a custom os and declare it shitty.
most of my friends that use Samsung are fan of it but they are also not very techy so i guess it suits them well. i am the guy who first installs nova launcher in his device, so let's see what it brings on the table. from the 3rd person p.o.v, i felt its screen and camera images to he nice whenever i used their mobiles, so let's see what this brings to the table :(7 -
So I've been dealing with one hell of a shit bag filled property management company since the numbnuts that lived next door to us set the building on fire (and didn't wake us up). The fire was pretty brutal, but it seems like this company wouldn't be satisfied without amplifying the misery. So I was wondering if anyone had created any kind of bot to auto post things to someone's social media accounts? I figured if they were going to be total dicks about things, the least I could do was try to help out with any of their search engine optimization efforts.5
-
In an algorithm class, professor introduced us to some simple search algorithms (bubble sort, selection sort, insertion sort, shell sort). He did a quite decent job and most of the students were able to grasp the code and understand the differences in those algorithms. But then he spoiled his whole lecture with one additional slide. There he proposed an optimization: Instead of using a temporary swap variable, we just could use the first array element (or the zeroth element, respectively: the one ad index 0) for doing all the swapping. We just had to document that, so that the caller would "leave the first position of the array empty", resulting in "cleaner code". And he did that in the same class where he used Big-O notation to argue about runtime complexity. But having the caller to resize the array and to shift all the elements by one position did not matter to him at all, because it was "not part of the actual algorithm".2
-
Looked up at the clock... 2 AM... Thought about giving up and going to sleep, but something kept me there...
Rewrote my encoder and decoder for my steganography program, which are used to insert and retrieve data respectively from images. Compiled, ran, and output was as expected!
Tried to write actual data, instead of just headers, to the image, and it broke... Of course it wouldn't work first try, it's me writing the code after all.
But then, after debugging for a while and changing a couple lines, the encoder looked like it had done its work properly. Then I decoded it, and voila, data completely recovered! It almost felt too magical to be true, usually I have to modify a lot more to get it working.
So now I'm in bed, after literally decimating the memory usage of the program, amongst other optimizations, and I know that the code works perfectly 😎 best part is I refactored each class down to 100 lines each, so now it's clean and dense 😇
Just had to share, feeling so good right now 😄2 -
The moment you realize you've got suboptimal code tattooed onto you forever 😂undefined tattoos developers refactoring optimization jokes motivational joke incompetence motivational crap1
-
Got asked by a coworker for some help, looked at the code and told him it could be written better and show him the example.
His reply : "It's not easy to read for me"
That was ok but then, now here's the kicker, he asked another coworker to come and see which was easier to read.
You did what mate?
So of course i got pissed and went out for a smoke just to return to see my version being used.
WHY THE FUCK DID YOU ARGUE ABOUT READABILITY IF YOU"RE GOING TO USE IT ANYWAY???
Fuken fuk, never again am i going to offer optimization support to people. -
OK what the actual fuck is going on within this company.
TL;DR: Spaghetti Copy/Pasted code that made me mad because it's just a mess
I just looked into a code file to search for a specific procedure regarding the creation of invoices.
I thought "Oh this is gonna be a quick look-through of like 1000 lines MAX" turns out this script is 11317 fucking lines long and most of it's logic is written there multiple (up to 6-7 times). And I'm not talking about a simple 10 lines or something. No! Logic of over 300 lines.. copy & pasted over .. and over .. and over?! I mean what the fuck did this guy drink when he wrote this.
Alsooo 10000 of those 11317 lines is ONE FUNCTION.. I kid you not! It's just a gigantic if / else if construct that, as I said before, contains copy-pasted code all over the place.
Sadly my TL thinks that code cleanup / optimization is "not necessary as long as it works" like wtf dude. If anyone wants to ever fix something in this mess or add a new feature they take a few hours longer just to "adjust" to this fucking shit.
This is a nightmare. The worst part: This is not the only script that has shit like this. We got over 150 "modules" (Yeah, we ATTEMPTED something OOP-ish but failed miserably) that sometimes have over 15000 lines which could be easily cut down to 1/3 and/or splitted into multiple files.
Let's not start about centralization of methods or encoding handling or coding standards or work code review or .. you get the point because there's a character limit for one rant and I guess I'd overshoot that by a lot if I'd start with that. Holy shit I can't wait until my internship is over and I can leave this code-hell!!2 -
So I promised a post after work last night, discussing the new factorization technique.
As before, I use a method called decon() that takes any number, like 697 for example, and first breaks it down into the respective digits and magnitudes.
697 becomes -> 600, 90, and 7.
It then factors *those* to give a decomposition matrix that looks something like the following when printed out:
offset: 3, exp: [[Decimal('2'), Decimal('3')], [Decimal('3'), Decimal('1')], [Decimal('5'), Decimal('2')]]
offset: 2, exp: [[Decimal('2'), Decimal('1')], [Decimal('3'), Decimal('2')], [Decimal('5'), Decimal('1')]]
offset: 1, exp: [[Decimal('7'), Decimal('1')]]
Each entry is a pair of numbers representing a prime base and an exponent.
Now the idea was that, in theory, at each magnitude of a product, we could actually search through the *range* of the product of these exponents.
So for offset three (600) here, we're looking at
2^3 * 3 ^ 1 * 5 ^ 2.
But actually we're searching
2^3 * 3 ^ 1 * 5 ^ 2.
2^3 * 3 ^ 1 * 5 ^ 1
2^3 * 3 ^ 1 * 5 ^ 0
2^3 * 3 ^ 0 * 5 ^ 2.
2^3 * 3 ^ 1 * 5 ^ 1
etc..
On the basis that whatever it generates may be the digits of another magnitude in one of our target product's factors.
And the first optimization or filter we can apply is to notice that assuming our factors pq=n,
and where p <= q, it will always be more efficient to search for the digits of p (because its under n^0.5 or the square root), than the larger factor q.
So by implication we can filter out any product of this exponent search that is greater than the square root of n.
Writing this code was a bit of a headache because I had to deal with potentially very large lists of bases and exponents, so I couldn't just use loops within loops.
Instead I resorted to writing a three state state machine that 'counted down' across these exponents, and it just works.
And now, in practice this doesn't immediately give us anything useful. And I had hoped this would at least give us *upperbounds* to start our search from, for any particular digit of a product's factors at a given magnitude. So the 12 digit (or pick a magnitude out of a hat) of an example product might give us an upperbound on the 2's exponent for that same digit in our lowest factor q of n.
It didn't work out that way. Sometimes there would be 'inversions', where the exponent of a factor on a magnitude of n, would be *lower* than the exponent of that factor on the same digit of q.
But when I started tearing into examples and generating test data I started to see certain patterns emerge, and immediately I found a way to not just pin down these inversions, but get *tight* bounds on the 2's exponents in the corresponding digit for our product's factor itself. It was like the complications I initially saw actually became a means to *tighten* the bounds.
For example, for one particular semiprime n=pq, this was some of the data:
n - offset: 6, exp: [[Decimal('2'), Decimal('5')], [Decimal('5'), Decimal('5')]]
q - offset: 6, exp: [[Decimal('2'), Decimal('6')], [Decimal('3'), Decimal('1')], [Decimal('5'), Decimal('5')]]
It's almost like the base 3 exponent in [n:7] gives away the presence of 3^1 in [q:6], even
though theres no subsequent presence of 3^n in [n:6] itself.
And I found this rule held each time I tested it.
Other rules, not so much, and other rules still would fail in the presence of yet other rules, almost like a giant switchboard.
I immediately realized the implications: rules had precedence, acted predictable when in isolated instances, and changed in specific instances in combination with other rules.
This was ripe for a decision tree generated through random search.
Another product n=pq, with mroe data
q(4)
offset: 4, exp: [[Decimal('2'), Decimal('4')], [Decimal('5'), Decimal('3')]]
n(4)
offset: 4, exp: [[Decimal('2'), Decimal('3')], [Decimal('3'), Decimal('2')], [Decimal('5'), Decimal('3')]]
Suggesting that a nontrivial base 3 exponent (**2 rather than **1) suggests the exponent on the 2 in the relevant
digit of [n], is one less than the same base 2 digital exponent at the same digit on [q]
And so it was clear from the get go that this approach held promise.
From there I discovered a bunch more rules and made some observations.
The bulk of the patterns, regardless of how large the product grows, should be present in the smaller bases (some bound of primes, say the first dozen), because the bulk of exponents for the factorization of any magnitude of a number, overwhelming lean heavily in the lower prime bases.
It was if the entire vulnerability was hiding in plain sight for four+ years, and we'd been approaching factorization all wrong from the beginning, by trying to factor a number, and all its digits at all its magnitudes, all at once, when like addition or multiplication, factorization could be done piecemeal if we knew the patterns to look for.7 -
Why people loves Java? It's because the maintenance or something in architectural level? I don't understand, because we have languages like Python with a better syntax and languages like C++ with a better optimization and speed of processing9
-
One of professors has an interesting philosophy in regards to how software is planned. He makes us forget that we dealing with a computer and has us write instructions as if we are teaching a human (no optimization, binary, or unnecessary numeral variables). Then we change it into code, then we optimize it. Every time. It freaks me out, but it gets us thinking. Not sure. If that is genius or insanity.1
-
Visual Studio Code + Mac = not lightweight, really not that good performance
I mean the battery is burning. Literally, i plug my mac out and after a hour the battery is dead10 -
My biggest dev sin is premature optimization. I'll try to produce the best possible code without the need for it to be there. I will waste my time thinking of wierd edge cases that can be handled with a simple if-else, but why not tweak the algo to handle them internally.
-
This is really annoying. My single manual test takes 10 minutes to run. Can't blame the task because its big, can't blame me, code optimization is not necessary and won't speed anything up. So here writing a rant waiting for it to finish1
-
I just started using a new React component library
https://ant.design
apparently they decided that rather than include all the icons as a separate font file, or dynamically loaded SVG, they would encode every single icon as a SVG in a JS string, and concatenate them all together into a single file.
I feel dirty but I just committed a 2MB javascript payload to the staging server.
Suggestions for a LIGHTWEIGHT React/Typescript component library?1 -
When I say I'm in "DevOps" what I really mean is that I'm a full-stack engineer, DBA, system administrator, security engineer, auditor, cloud custodian, cost optimization expert, and everything else that doesn't get its own dedicated staff member here. Pretty much the catch all between developers and customer.
-
Cheated with my beloved 'optimization' to make a go around that fucking bug and then the temporary work around turned out to be nice feature. Great!! 😑 But I am not happy :( fml1
-
I'm currently doing project in Java using JavaFX for GUI and after like 6 months I found out we can bind textfields to variables(yea,dumb me) and I got more than 20 forms so of course, binding is useful than that getText method. So I think there are many things like this which will help me to optimize my code but I dont know, so can anyone tell me more stuff like this?
I'm using MongoDb so I'm currently finding easiest way to make Bson document from textfield values. Any suggestions?
(Sorry, for my bad English)1 -
Question to the frontend devs: I'm currently trying to optimize part of our JS. How do sourcemaps influence loading/rendering Speed in the Browser?
In the `webpack.config.js` we use uglify as minimizer for js. It has the option `sourceMap` Set to `true`. Now as I understand it, this caused it to Inline a sourcemap inside the JS file (which leads to a slightly bigger file size and thus longer load time for the generated file...).
My Question: should sorcemaps be enabled for prod (minified) files? Why yes, why no? Do they help the browser parse the JS faster?12 -
for my job I need to know,
Programming, C#, Optimization, Multithreading and Async code, Working certain tools, Reading difficult written code, Understanding, Physics, Networking, Rendering, Codeloops, Memory management, Profiling tools, Being able to make Jira tickets and read Jira tickets. Understanding source control branching, merging, push and pull. bug fixing.
And I write almost 1 line of code a week on average..
I'm a programmer.2 -
To be honest with you, I’ve never had a bad experience with PHP.
Yes, it’s “dirty” compared to something like Haskell, but it’s not a bad thing. Dirty things usually bring simplicity and allow implementing the intended case super quickly, at the cost of breaking apart at scale. There are no bad tools, there are wrong tools for the job.
Premature optimization is the root of all evil. The more I launch new projects for me/other companies, the more I come to the realization that the vast majority of the projects out there will never see scale. They will be proven non-viable/impractical and deemed obsolete way before they outgrow the $20 VPS they were hosted on.
Sometimes (all the time, really) launching quickly like there is no tomorrow is the most viable business strategy. If (yes, “if”, not “when”) your project outgrows PHP and gets to the point when PHPs abstraction model is the bottleneck, you’ll have the money to rewrite the project in any language out there, trust me.
As someone said on biking subreddit to a person that asked how to buy the newest super-aero helmet, “if the aerodynamics of the old helmet is what holds you back, someone will be sending you the new one for free”.6 -
Premature timesheet delivery optimization. This slimy dude (third-party) pops in evangelizing cloud Ms Excel for "both our comfort" to submit a fucking timesheet, without any prior context
Cloud's slower, I don't have a local copy of it, and you can mess with the data cells, blurring responsibility for sync mistakes. No way I'm going to do that.
Until now I've just had the template locally, fill it in and send him the Excel file end of month and neither I or anyone that I know of have brought up issues with this process (mind you this was sth. he was responsible for, but he messed up so badly I took it over)5 -
Laravel being easy to use is far from a strong point. "Easy to use" is a cool thing for pro developers who know what's going on under the hood and don't wanna write the same thing a hundred times.
It should translate into good developers being able to work immediately, not in bad developers getting away with whatever without getting even a slight warning just because the framework itself accepts whatever weird crap you can come up with while you're training.
But that's what it became: a free for all for every noob out there. You find yourself working with a slow application (and by "slow" I mean "slow even by Laravel's standards", which are fairly low), and as soon as you look what's going on you find someone decided to load a hundred thousand middlewares, queries optimized like ass on top of Eloquent, and the whole application breaks as soon as you just run config:cache to try speeding it up a little bit, because env-ing your way out of whatever problem is so quick. Easy to use needs to be there for pro developers; give such a tool to a newbie, you end up with a maintenance nightmare3 -
Does the windows "optimization" feature which apparently is defragmenting in the background, and apparently "optimizing" ssd's differently of any use? The only thing I notice is that this function makes the icons of my desktop reload on a regular basis. My guts tell me it's utter bs and is just slowing down the system.
Any experiences, optinions, thoughts?6 -
I just love optimizing stuff and here is my story I think somehow is very cool as you can see the progress just looking at two values.
//NOTE: This api relies on another api which is slow af. The requests are done here directly but later will be carried out async and in the background by using some ticket system.
1) First PoC
2) Used caching of requests and improved method to filter out unnecessary stuff
3) Optimized response formatting
NOTE to myself: Things are going too good...4 -
Up all damn night making the script work.
Wrote a non-sieve prime generator.
Thing kept outputting one or two numbers that weren't prime, related to something called carmichael numbers.
Any case got it to work, god damn was it a slog though.
Generates next and previous primes pretty reliably regardless of the size of the number
(haven't gone over 31 bit because I haven't had a chance to implement decimal for this).
Don't know if the sieve is the only reliable way to do it. This seems to do it without a hitch, and doesn't seem to use a lot of memory. Don't have to constantly return to a lookup table of small factors or their multiple either.
Technically it generates the primes out of the integers, and not the other way around.
Things 0.01-0.02th of a second per prime up to around the 100 million mark, and then it gets into the 0.15-1second range per generation.
At around primes of a couple billion, its averaging about 1 second per bit to calculate 1. whether the number is prime or not, 2. what the next or last immediate prime is. Although I'm sure theres some optimization or improvement here.
Seems reliable but obviously I don't have the resources to check it beyond the first 20k primes I confirmed.
From what I can see it didn't drop any primes, and it didn't include any errant non-primes.
Codes here:
https://pastebin.com/raw/57j3mHsN
Your gotos should be nextPrime(), lastPrime(), isPrime, genPrimes(up to but not including some N), and genNPrimes(), which generates x amount of primes for you.
Speed limit definitely seems to top out at 1 second per bit for a prime once the code is in the billions, but I don't know if thats the ceiling, again, because decimal needs implemented.
I think the core method, in calcY (terrible name, I know) could probably be optimized in some clever way if its given an adjacent prime, and what parameters were used. Theres probably some pattern I'm not seeing, but eh.
I'm also wondering if I can't use those fancy aberrations, 'carmichael numbers' or whatever the hell they are, to calculate some sort of offset, and by doing so, figure out a given primes index.
And all my brain says is "sleep"
But family wants me to hang out, and I have to go talk a manager at home depot into an interview, because wanting to program for a living, and actually getting someone to give you the time of day are two different things.1 -
I'm a dev lead. I'm trying to consolidate a squad. There's a senior in it preaching the dream of career climbing and LinkedIn optimization.
Now all interns want to switch squads. I'm all for personal growth... but now everyone wants to be everything at once and productivity stalled. The job descriptions for our squad were perfectly clear, there's tons of different tech stacks... We can build a lot of cool things in this scope, and now no one can see them because Data Science or Data Engineering or Front-end is suddenly sparkling.
I'm tired.3 -
MRW I spend hours merging/deleting needlessly scattered configuration options and logic, and the application runs successfully4
-
Oi windows, your highly intelligent "transmission optimization process" is not really helping me by hogging the whole bandwidth while I'm downloading something.2
-
Time for a 00:30 rant that has no structure!
(There is a theme tho)
TI-BASIC optimization (framecount is from TI-84 Silver, with the higher Z80 clock):
"0→S": 3 frames
"DelVar S": 2 frames
```
0
Ans →S
```
1 frame???
(Variable "Ans" holds the last answer given to the normal calc functions. This makes it blazing fast to use [for some reason])
also refreshing the real TI-8x line's LCD at its actual, normal rate is bad and *SOMEHOW* ends in LCD overvolting (makes parts of the LCD blue instead of dark gray) after ~15 frames. The TI-8x line's normal OS thing refreshes the LCD at 30-45FPS depending on their clock speed, the LCD is native 80FPS. Just figured i should point this out. (Yes, TI, you do make hardware, it's just that sometimes you should make it when SANE)
why the fuck did they make a multitasking machine that runs on a Z80 at, like, 7/8 the original Gameboy's speed (the B/W DMG, the original. The CGB had DoubleSpeed mode.)1 -
The reason I don't use Linux on my desktop is its hobby of saying “fuck off” spontaneously and without warning when I need it the most.
A designer friend shares his After Effects project and asks to export that to Lottie? Fuck off.
Your Android phone decided to brick itself with an OTA update (yep, happened to me, thanks Sony), and you need to unbrick it? Fuck off!
A musician friend wants to connect his audio card (that of course has no Linux drivers) and record some bass riffs? Tell him to fuck right off mate.
Your boss suddenly asks you to check an MS Access file for him as he's en route to an important meeting? Yep, you guessed it — fuck off.
Your government now requires your tax papers to have digital signatures? Fuck off, it only works for Mac and Windows.
Want to connect an old digital camera? Would you please fuck off?
I know I'm gonna get heat from Linux fanboys, especially on this platform. After all, a designer should know how to export to Lottie if he's a real designer, you should've bought a better phone, your friend should've had his laptop with him, your boss should've used open source tools instead of MS Access… Wait, he was tasked that from above? Then his boss should've used open source tools! Government mandates digital signatures? Well, tell them to port that to Linux! Start a riot! Get a better government! Move to a better country! Digital cameras? Who uses them in 2024, especially old ones! Are you some kind of hipster?
I know preparing for corner cases is bona fide premature optimization, but that's the whole point — with Mac or Windows, you don't have to prepare at all. You always have options. With Linux, your number one option is to have Windows handy if need be.
Linux works perfectly on my server, but not on my laptop.24 -
YGGG IM SO CLOSE I CAN ALMOST TASTE IT.
Register allocation pretty much done: you can still juggle registers manually if you want, but you don't have to -- declaring a variable and using it as operand instead of a register is implicitly telling the compiler to handle it for you.
Whats more, spilling to stack is done automatically, keeping track of whether a value is or isnt required so its only done when absolutely necessary. And variables are handled differently depending on wheter they are input, output, or both, so we can eliminate making redundant copies in some cases.
Its a thing of beauty, defenestrating the difficult aspects of assembly, while still writting pure assembly... well, for the most part. There's some C-like sugar that's just too convenient for me not to include.
(x,y)=*F arg0,argN. This piece of shit is the distillation of my very profound meditations on fuckerous thoughtlessness, so let me break it down:
- (x,y)=; fuck you in the ass I can return as many values as I want. You dont need the parens if theres only a single return.
- *F args; some may have thought I was dereferencing a pointer but Im calling F and passing it arguments; the asterisk indicates I want to jump to a symbol rather than read its address or the value stored at it.
To the virtual machine, this is three instructions:
- bind x,y; overwrite these values with Fs output.
- pass arg0,argN; setup the damn parameters.
- call F; you know this one, so perform the deed.
Everything else is generated; these are macro-instructions with some logic attached to them, and theres a step in the compilation dedicated to walking the stupid program for the seventh fucking time that handles the expansion and optimization.
So whats left? Ah shit, classes. Disinfect and open wide mother fucker we're doing OOP without a condom.
Now, obviously, we have to sanitize a lot of what OOP stands for. In general, you can consider every textbook shit, so much so that wiping your ass with their pages would defeat the point of wiping your ass.
Lets say, for simplicity, that every program is a data transform (see: computation) broken down into a multitude of classes that represent the layout and quantity of memory required at different steps, plus the operations performed on said memory.
That is most if not all of the paradigm's merit right there. Everything else that I thought to have found use for was in the end nothing but deranged ways of deriving one thing from another. Telling you I want the size of this worth of space is such an act, and is indeed useful; telling you I want to utilize this as base for that when this itself cannot be directly used is theoretically a poorly worded and overly verbose bitch slap.
Plainly, fucktoys and abstract classes are a mistake, autocorrect these fucking misspelled testicle sax.
None of the remaining deeper lore, or rather sleazy fanfiction, that forms the larger cannon of object oriented as taught by my colleagues makes sufficient sense at this level for me to even consider dumping a steaming fat shit down it's execrable throat, and so I will spare you bearing witness to the inevitable forced coprophagia.
This is what we're left with: structures and procedures. Easy as gobblin pie.
Any F taking pointer-to-struc as it's first argument that is declared within the same namespace can be fetched by an instance of the structure in question. The sugar: x ->* F arg0,argN
Where ->* stands for failed abortion. No, the arrow by itself means fetch me a symbol; the asterisk wants to jump there. So fetch and do. We make it work for all symbols just to be dicks about it.
Anyway, invoking anything like this passes the caller to the callee. If you use the name of the struc rather than a pointer, you get it as a string. Because fuck you, I like Perl.
What else is there to discuss? My mind seems blank, but it is truly blank.
Allocating multitudes of structures, with same or different types, should be done in one go whenever possible. I know I want to do this, and I know whichever way we settle for has to be intuitive, else this entire project has failed.
So my version of new always takes an argument, dont you just love slurping diarrhea. If zero it means call malloc for this one, else it's an address where this instance is to be stored.
What's the big idea? Only the topmost instance in any given hierarchy will trigger an allocation. My compiler could easily perform this analysis because I am unemployed.
So where do you want it on the stack on the heap yyou want to reutilize any piece of ass, where buttocks stands for some adequately sized space in memory -- entirely within the realm of possibility. Furthermore, evicting shit you don't need and replacing it with something else.
Let me tell you, I will give your every object an allocator if you give the chance. I will -- nevermind. This is not for your orifices, porridges, oranges, morpheousness.
Walruses.16 -
Interesting definitions
1. Project Manager is a Person who thinks nine Women can deliver a baby in One month.
2. Developer is a Person who thinks it will take 18 months to deliver a Baby.
3. Onsite Coordinator is one who thinks single Woman can deliver nine babies in one month.
4. Client is the one who doesn’t know why he wants a baby.
5. Marketing Manager is a person who thinks he can deliver a baby even if no man and woman are available.
6. Resource Optimization Team thinks they don’t Need a man or woman; They’ll produce a child with zero resources.
7. Documentation Team thinks they don’t care whether the child is delivered, they’ll just document 9 months.
8. Quality Auditor is the person who is never happy with the PROCESS to produce a baby.
9. Tester is a person who always tells his wife that this is not the Right baby. -
I'm in love with service workers. This is so fucking satisfying (also love the offline first capabilities)6
-
Why open-source matters: I can remove annoyances like starting in front-facing mode from a smartphone camera software, and hide the button for the "effects" drawer that I never use since I can add Sepia or black/white in post processing should I ever need it.
Both of these annoyances cause missing moments. If the source code of the camera software is open, and if the operating system is rooted, these utter annoyances can be removed.
There are open-source third party applications like "Open Camera", but they lack quick launch support and might have, presumably due to lack of optimization, a two-second shutter lag. Big no. -
My biggest flaw when working in IT: I will refuse to prioritize time- consuming work with minimal added value (cf premature optimization, 0.001% edge cases) when I have a backlog of work that will add much more, obvious value and I will not budge to manager or architect power-plays and tendencies to micromanage my responsibilities, even if it may eventually end up getting me in trouble.2
-
Optimizing my RESTful API plugin, used in a CMS to make it headless, was extremely satisfying.
Thanks to caching and alorithm improvements, I brought the response times down by a factor of 150.
The caching also includes dependency tags thus it will automatically invalidate on changes in the dependent element.1 -
Lead developer likes premature optimization. Always forces me to remove a if here and there because "bad for the performance".
Now her optimization caused a base component to fail, ppl will have to spend the night debugging.
Best of all, it's my last day ;) -
While a precaching service worker can grossly improve the performance of a SPA, it definitely doesn't improve the speed of development when introduced between the dev's browser and the app to be debugged.3
-
So my multithreading optimization is now in UAT.... it looks like it's working and not crashing....
It seems it's also 50%... aka saves 1hr...
I'm having a rare moment when I actually feel good about and actually did something at my job... -
Since I have recruitment experience, I was given a stack of resumes for a back end opening. We have an incredibly complex application, so optimization is very important. Ran a lighthouse report against one candidate's personal website. 29/100 gtfo1
-
I love it when a coding assignment is to take the last assignment and do one thing more optimized !!! 😄😄
All the hard stuff is already done and all I have to do is some optimization that I’ve done before in other languages and just have to implement in this one 😄6 -
How do you implement TDD in reality?
Say you have a system that is TDD ready, not too sure what that means exactly but you can go write and run any unit tests.
And for example, you need to generate a report that uses 2 database tables so:
1. Read/Query
2. Processor logic
3. Output to file
So 1 and 3 are fairly straightforward, they don't change much, just mock the inputs.
But what about #2. There's going to be a lot of functions doing calculations, grouping/merging the data. And from my experience the code gets refactored a lot. Changing requirements, optimization (first round is somewhat just make it work) so entire functions and classes maybe deleted. Even the input data may change. So with TDD wouldn't you end up writing a lot of throwaway code?
A lot of times I don't know exactly what I want or need other than I need a class that can do something like this... but then I might end up throwing the whole thing out and writing a new one one I get a clearer idea of what i or the user wants or needs.
Last week I was building a new REST API, the parameters and usage changed like 3 times. And even now the code is in feasibility/POC testing just to figure out what needs to be used. Do I need more, less parameters, what should they be. I've moved and rewritten a lot of code because "oh this way won't work, need to try this way instead"
All I start with is my boss telling me I need an API that lets users to ... (Very general requirements).10 -
Does any of you have the compulsion to micro-optimize every bit of code that you write? How do you deal with it?
I'm not just talking about algorithmic optimizations, but the real nitty gritty stuff. I'm talking about using bit fiddling to avoid if statements where speculative processors might make mispredictions. Anything that might make a program compile to fewer machine instructions or avoid extra stack frame overhead.
This all started a year ago when I took a systems programming course at my university, and started learning C and C++. But I find myself doing this in the wrong places. Who cares if this trivial program that I wrote runs in 1.2 or 0.6 seconds? My future employers won't care if my code is 10% more efficient when it takes four times as long to write.
It's gotten to the point that I can't bring myself to use languages like Python because I don't know how it's implemented under the hood and can't predict how the different ways I could write a function will affect performance. How do I bring myself to trust that the compilers (or interpreters) and the programmers that wrote them will be sufficiently optimal, and just move on? 😩4 -
Enabled a mysql optimization once, corrupted the whole live DB on a sunday while I was an hour away from the nearest internet connection.....
Luckily we had a live replication server so not much was lost (though uploading it over a 14mbit connection takes a long time for 30GB) -
Previously: https://devrant.com/rants/1207077/...
Talked the bossman, he just asked that I finish the project before being put back on my usual ERP maintainer role.
I agreed to it and the faster this fucking plugin is done, the faster I can go back to my optimization and maintenance project :D -
The nice thing about my current side project is that I don't have to care at all about optimizing. It takes 5 seconds for the motors to do their thing and I spend 95% of that waiting even with my horribly slow (but easy to write) code.1
-
Wow. Fucking wow. My CPU is an i7 6700K on 4.5GHz. What's this process doing that any single fucking core is on 100% load?!?! After killing these two the CPU load is on ~5%. WTF
(ik it's only on 59% load on the screenshot but it's going from there to 100%)8 -
I'm wondering if there is a way to use Machine Learning algorithm to optimize games like Screeps.com, which is a game that you control your game by writing JS code. Letting the algorithm write human readable code might be too challenging, but optimizing some aspect of the game should be possible, like the best scale up route optimization using re-enforced learning.3
-
!rant
REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
fuck you Samsung and your "APPLICATION OPTIMIZATION" I need this fucking 2FA code right now1 -
I spent the last 1.5 hours trying to optimize delivery of two 8.0KB JS files. It didn't work, at all tried like everything I could find. At the end I initialized it in angular json and made it load regardless. Made me realize that it is not made for optimization.1
-
This is true I swear... I once worked on part of a project "optimization" that required, running a job on sidekiq in the background that spawns multiple threaded RPC calls on RabbitMQ (and be I/O blocking) till the jobs are done (or failed) so that it updates the status of the master object (that has the associated objects processed) and sends an email to the ops manager (just a summary email)... instead of using database locks... or dropping the email requirement...
I did it without arguing because I've already quit the job a while ago... -
DOM manipulation in React apps such as
div.style.bottom = '20px;'
is a bitch to optimize.
Anyone got any tips?10 -
Google Play Music uploading songs to the library with Chrome is a cpu killer, it was at like 97% and laptop was lagging as hell
-
https://appleinsider.com/articles/...
Tl;Dr This guy thinks apple is poised to switch the Macs to a custom arm based chip over x86! He's now on my idiot list.
I paraphrase:
"They've made a custom GPU", great! That's as helpful as "The iPad is a computer now", and guess what Arm Mali GPUs exist! Just because they made their own GPU doesn't make it suitable for desktop graphics (or ML)!
"They released compilation tools right when they released their new platform, so developers could compile for it right away", who would be an idiot not too...
"Because Android apps run in so many platforms, it's not optimized for any. But apple can optimize their apps for a sepesific users device", what!? What did I miss? What do you optimize? Sure, you can optimize this, you can optimize that... But the reason why IOS software is "optimized", and runs better/smoother (only on the newest devices of course) is because it's a closed loop, proprietary system (quality control), and because they happen to have done a better job writing some of their code (yes Android desperately needs optimization in numerous places...).
I could go on... "WinTel's market share has lowly plataued", "tHeY iNtRoDuCeD a FiElD pRoGrAmMaBlE aRrAy"
For apple to switch Macs to arm would be a horrible idea, face it: arm is slower than x86, and was never meant to be faster, it was meant to be for mobile usage, a good power to Wh ratio favoring the Wh side.
Stupid idiot.19 -
Continuation of my first comment regarding the poor use of dictionaries...
Co-worker's code:
Foreach kvp in dict1{
ForEach kvp2 in dict2{
...
ForEach x in list{
ForEach kvp3 in dict3{
...
}}}
At least 2 of those kvp iterations can be changed to a standard dictionary use
What the hell am I looking at...... :(3 -
TIL ECMAScript (2015) supports tail call optimization, except virtually only safari can do that, making it useless1
-
Learning Pulumi with Python. Not a fan of Py, but I know my way around.
There's a dev cluster. My colleague asked me to modify Pulumi scripts for cost optimization, as the project transitioned to maintenance mode and is no longer needed on daily basis. Since I'm learning, he asked me laughing not to delete/change the static IP and not to delete the cluster.
I'm currently recreating the cluster anew for the third time :)
Gotta say, destroying a cluster is only scary the first time.4 -
Oh, come on! Human Resource Machine, Three Sort, a single cycle away from the optimization challenge! What more do you want from me?
Also, I have already gotten the challenge completed for only using 34 commands. I'm increasing the number of commands greatly for the cycle challenge in order to avoid swapping.1 -
In banking industry it brings up security concerns. We were in the exact same situation, however using SAS+SPDE with some custom SAS and tsql queries. Our database was merely 100TB, still it was a nightmare to assure stable performance thoroughly, because SPDE could not properly handle SMT. After having 24h++ daily flow processing times, the managers have decided to rent a 6 years old IBM power 7 with dedicated processor cores, which eventually have truncated the processing time down to 15 hours. This was a time limited contract, for 6 months. I've left the company in a short while, but this made the managers to rethink buying a more up to date server, so now the daily processing flows now are around 11,5h. Long story short, sometimes a little architecture optimization does the trick.
-
Wordpress is such a slow shit!!! It doesn't matter how many plugins for optimization do you use, this shit is always slow! why this kind of tech has to exist in many places of the internet 😒😒6
-
Everyone who runs tests on our platform complains about the speed and says that it needs to be optimised ASAP. Then assumes someone else will do it. Then a few weeks later they complain again!
Vicious cycle...Vicious cycle! -
I wrote a whole article about it, and oh wow, it still exists. It was probably the first optimization I ever did in my life, and it was while I was learning SQL.
And writing an edu-tainment article aimed at total laymen as well as beginners was also fun.
http://swczdev.blogspot.com/2010/...
Sadly, czech language only. But... the english autotranslation actually looks readable:
https://translate.google.com/transl...
Long story short, though: 4 or 5-table join going from 7 seconds before optimization, to 0.08 seconds after optimization. Both were written by me, the optimized one was written without any reading on how to optimize SQL, based purely on me actually stopping to think about how I can reduce the DB load based on the little that I knew about how SQL servers work.
Optimization made it about 99,9999422% more efficient, based on my improvised efficiency metric of how many rows the query retrieves and produces versus how many are thrown away on the end due to the WHERE part of the query.
And that was also the day when my question of "what is there even to optimize in SQL?) was answered... by myself.3 -
always the same, while im in a part of the system, i notice an optimization that can speed up a major query which has to join a table which is about 4gb or something ridiculous. i make ammendments using partitions because they're in the defined on that table. test. everything cool. only to be told that theres no job to clear out old partitions so i end up reverting everything i've been doing which basically makes my day's total output == bollock-all. WHY DO WE PUT HALF BUILT SHIT INTO PRODUCTION!!!???2
-
Code Optimization 😉
Before doing: After doing the changes, it ll be much easier to maintain😇
While doing : how it was working before 🤔 why I need these lines 🙄
After doing : Never gonna optimize existing file instead will start following the standard hereafter😏
While working thereafter.. 😛 : Instead of following these standards which consumes time, I can make the logic quicker and will optimize later...
Again the cycle repeats 😂 -
Optimization concepts/patterns or instances?
For pattern its gotta be any time i can take a O(n^2) and turn it into O(n) or literally anything better than O(n^2).
Instance would probably be the time that we took an api method that returned a json list made up of dictionaries CSV-style and changed it into a dictionary with the uid as the key and the other info as key-value pairs in a sub-dictionary. So instead of:
[
{
"Name": name,
"Info":info
}
]
We now return:
{
name:
{
"Info": info
}
}
Which can, if done right, make your runtime O(1), which i love. -
So happy, a former colleague, now friend, of mine decided to join my project, he has a lot of experience and helped me out a ton in my first professional years to gain knowledge about optimization, performance, architecture and countless more stuff.(--> wk73 best dev teacher I had)
The only downside, in this case very minor downside, is that I now have to go back to something I despise: project management... I need to properly format and transfer all my scribblings and thoughts into a roadmap and a rough specification, so he has a good start into the project.
Overall though I am really looking forward to this collab, since I love to work in a team, especially with such great support. -
Procrastinating as I had to deliver a full working Android app and it'd Backend to feed data to it. I had 6 months. I pulled 2 all nighters and finished the entire project in just one week. I and I totally ducked it up. No backend optimization means with 100 users online the server will go stupid and don't know how to handle the pressure. The Android app just doesn't work on some devices due to a poor error handling. So yeah, I totally love to procrastinate, but I'll just leave that for later.
-
Next.js is a piece of shit framework, (Like React is next level shit), which enforces things in the name of "convention" and is just a PITA to work with. Have to migrate an existing project to next? Make sure you use css-in-js, or you cant use next. Want to use a shared layout? lol, gtfo. Want statically optimized assets? make sure you call the correct apis in pages or you get no optimization.
┻━┻︵ \(°□°)/ ︵ ┻━┻5 -
Anyone learn about Bloom filters in school? I was watching a lecture and he mentioned using a Bloom filter with a few hash functions to create a cache you can use to avoid querying a table if there's no match, which is a neat idea. I've never heard of this but I also didn't study CS in school so I'm curious if it's common knowledge.1
-
Yet another unusual take for the Orchid STL: Unicode codepoints aren't a part of the string library.
For the purposes of a high level language, the unit of text is a grapheme. Strings can be converted between Unicode and binary blobs. In a binary, indices address bytes. In text, indices address graphemes. For example, searching a string for a substring that consists of a single letter implies the added constraint that the letter must not have accents or other modifiers.
For storage and transfer optimization it's possible to discover the byte length of a string without converting it to binary2 -
- Android Games! One idea I have is similar to COD Black Ops Zombie mode for mobile in multiplayer mode. I've already completed some Unity tutorials and pretty much learnt how to build games. Never got down to building one though :(
- Real time graphics rendering and optimization. Think Anti Aliasing, Anisotropic Filtering, Tesselations. -
Folks should give Clojure a look. It may be Lisp on steroids. Need to wrap your brain around macros to use it properly. It's interpreted so it must be slow, riiight?
Not so, er, fast.Ran across a discussion re C++ vs Clojure running data acquisition at 100 MBPS or better. Bottom line, original Clojure code was sped up 76.6x and blew the doors off the C++ code.
Be warned, a number of optimization steps were required. The end result blew me away. Had a link I wanted to insert but it's not on my phone and I may have re-installed Linux wiping it out. Have looked for the post for hours, no joy.
https://clojureverse.org/t/...6 -
I'm in a big fat fucking stinking rut, as in progress on this project has absolutely stagnanted.
Gonna rubber face your duck now **UNZIPS** excepts I don't have zippers, as joggers are the one true way; fake Adidas til I fucking drop.
Brain damage aside, I understand both how I've layed out the data and what I'm supposed to do with it. We have a virtual machine, an array of instructions and arguments for a given process within it, and we need to walk this array and map values to registers.
We also need to spill values inside registers to stack, IF they are required at a further point within that block. This also isn't terribly complex. We simply look forward in the array and see if the value is an argument to any instruction that *needs* this value to be loaded (ie, within a register).
So this implies multiple iterations; we need to better understand how one particular value is used throughout an F before we can make a final decision on how many registers and stack space are actually needed for the whole block.
Here's where it gets tricky. If there's a call, we need to be certain that the symbol being invoked has already been fully processed. Besides the obvious fact that recursion fucks me up, there's another matter: say a private method gets invoked by another private method. We can take advantage of this, by which I mean, sacrilege incoming so put on this toga.
Looking at the output for C compilers, it would seem this is not done in practice, I would assume because it's a pain in the ass. But when you have the guarantee that F will only be called internally, as that's what "private" means, there's two ways it can go:
0. It's well below the 13-20 cycle threshold, so you inline the fucker. No suprises there.
1. It's a more involved affaire, and invoked in more than one place, so you don't inline it. Codesize matters.
Recursion and [1] are the big deal things holding me back. Not because it's too hard, like I said this is kindergarten level abstraction. I'm just slow and fanatical, which is how I prefer to spell "constant obsessive paranoid delusions". I can see the potential optimization I can pull here, so I'm stuck trying to figure it out.
Idea would be, handling the register allocation and stack spill for an internal-internal (or deep internal; what we like to call a "guts" method) in synchronization with the *calling* processes. This is, fundamentally, violating all conventions -- but so under the hood no one will notice.
Let me give you an example. If we were to pass some value to a function, expecting to mutate it and get a different value back, in a lot of cases it'd be stupid to make an implicit copy by using two registers, one for input and another for the output. Dude, it's one cycle. Multiply it by a million, say sixty times per second, for every time you __needlessly__ make a copy of a value that we've already stated is mutable.
Clearly unacceptable. This is, in the strictest sense, everywhere in every single codebase. Premature micro optimization is the root of all goodness, God is great and praiseworthy. So how do we go about it?
Answer is I know and I don't know. By which I mean to say, this very thing I've done by hand. Assembly is fun. Now the issue is teaching a calculator how to do it. Not so fun.
There is a dependency chain between processes, as I believe I've kind of alluded to. I'm trying to make decisions on the side of the caller depending on the details of the callee, which is why recursion is rawdogging my soul. This is the same situation, it's inverting the direction of one or more links in the dependency chain, which makes no fucking sense.
And yet it does.
Brain, explain yourself.
How do *you* handle this without crashing?
Brain?
<<ME STEWPED; BEEP-BOOP>>
Alright then, that was a useless attempt at fuckery. Let's have a nap then, maybe it'll come to me in the morning. That's what I've been saying to myself for almost a month now.
Perhaps it is a hardcoded fuk.1 -
UWP suck, I don't wanna hurt yall feeling but it's time to face the truths:
+ SandBox
+ Less Job Offer
+ Development more Complicated than Web App
+ Microsoft not create perfect hardware to make sure our app get to more consumers (the Pro X is failure)
+ Poor Optimized
Poor Optimized ?
the Windows 10 optimization is joke, all my surface laptop, pro, book I have tested. They claim that consume less Ram, but when using it along side electron and Win32 app. It feel so much choppy and lag. I mean WTF ?
UWP was made for optimize low specs SoC such as ARM base, now my laptop running on a core I5 + GPU still lag ??
I'm sorry but this is just sad. Im moving back to win32. WinRT sooner or later will end supported
And Microsoft will improve the Win32 Api6 -
React development builds are so laggy that even the most basic of optimization I make to speed it up ends up as a significant improvement in performance in the production build2
-
Lately been working in deployment, automation, and optimization. (Web) im very open to hearing how people are doing this with various technology stacks.2
-
Relatively often the OpenLDAP server (slapd) behaves a bit strange.
While it is little bit slow (I didn't do a benchmark but Active Directory seemed to be a bit faster but has other quirks is Windows only) with a small amount of users it's fine. slapd is the reference implementation of the LDAP protocol and I didn't expect it to be much better.
Some years ago slapd migrated to a different configuration style - instead of a configuration file and a required restart after every change made, it now uses an additional database for "live" configuration which also allows the deployment of multiple servers with the same configuration (I guess this is nice for larger setups). Many documentations online do not reflect the new configuration and so using the new configuration style requires some knowledge of LDAP itself.
It is possible to revert to the old file based method but the possibility might be removed by any future version - and restarts may take a little bit longer. So I guess, don't do that?
To access the configuration over the network (only using the command line on the server to edit the configuration is sometimes a bit... annoying) an additional internal user has to be created in the configuration database (while working on the local machine as root you are authenticated over a unix domain socket). I mean, I had to creat an administration user during the installation of the service but apparently this only for the main database...
The password in the configuration can be hashed as usual - but strangely it does only accept hashes of some passwords (a hashed version of "123456" is accepted but not hashes of different password, I mean what the...?) so I have to use a single plaintext password... (secure password hashing works for normal user and normal admin accounts).
But even worse are the default logging options: By default (atleast on Debian) the log level is set to DEBUG. Additionally if slapd detects optimization opportunities it writes them to the logs - at least once per connection, if not per query. Together with an application that did alot of connections and queries (this was not intendet and got fixed later) THIS RESULTED IN 32 GB LOG FILES IN ≤ 24 HOURS! - enough to fill up the disk and to crash other services (lessons learned: add more monitoring, monitoring, and monitoring and /var/log should be an extra partition). I mean logging optimization hints is certainly nice - it runs faster now (again, I did not do any benchmarks) - but ther verbosity was way too high.
The worst parts are the error messages: When entering a query string with a syntax errors, slapd returns the error code 80 without any additional text - the documentation reveals SO MUCH BETTER meaning: "other error", THIS IS SO HELPFULL... In the end I was able to find the reason why the input was rejected but in my experience the most error messages are little bit more precise.2 -
Who's that sane to prefer programming with stored procedures than an actual programming language?
I would like to touch that shit only for optimization reasons, but when you have a project being built up without proper ORMs this is the idea that comes out of 'seniors' -__-8 -
I've recently had an exam, a C++ exam that was about sorting, pointers, etc... The usual. The exam was about Huffman's
optimization algorithm along with some pointer problems. He asked for a function to find something in a stack, what I did was write down a class that has a constructor, deconstructor, SetSize(), Add(), Remove(), Lenght(), etc.. He didn't give me any points for that, why? Because I didn't write down everything like in his book... I had classmates that literally had phones open with his book, he just watched how they copied code and gave them 10/10 points. But nothing to the guy that wrote down 20 pages of code. YES!! On paper, an IT university that asks you to program on a fucking paper. Good thing that at the very least I passed.
TL;DR
Teacher has book, I refuse to remember code from it/copy from it, I get lower grades than people that literally copied word for word.
Life is really fair. -
So I love what Apple is doing with the new Macs, great hardware, streamlined optimization, blistering performance.....great stuff.
But here's the thing. I think I'm gonna get a ThinkPad and just install fedora on it. It's far cheaper and outside of only going up to 16GB of ram it meets all my needs.
But between you and I a big factor in why I'm finding it hard to go Mac is the system settings. Like why is it like that? Why when I click something a separate window opens.....odd.6 -
We’re only random people living in random places, speaking random languages, eating random food, sleeping, studying and working random hours. Traveling to random points on a sphere.
Just random range is different.
Just random stuff happens on crossroads of two random dots and the entropy speed ups or slows down.
Nothing special at all.
Just a finite state machine iteration.
I mean the amount of effort we put into explanation of infinity is outstanding.
What if there is no infinity at all ?
What if infinity is just misunderstanding of our interpretation of the world around us. It’s just pixels, resolution, gaussian splatting, quantum state, you name it.
Hey man the world is flat. Just put it to the 2d space. How many space you need from a simulation perspective where your patient eyes can only see up to certain amount of light particles per second on a shitty lens.
Propose a world optimization techniques by slowing down subject perception, tiredness introduced. Compress memory, sleep introduced. Limit neurons, cpu power assigned. Deploy on cloud - put it to life. Exit 0 body failure. Exit 1 suicide. Kill -9 killed by tty from ip EARTH.X.Y
What you can do to make the world around this planet alive? Make it blink.
We developers are lazy and I believe that nature is even more lazy than us.
You think you’re going to elevator right now ? You’re going to the preloader. Looking at the window equals playing video from playback. Never goes live, just precomputed fsm. Cars, trains, airplains ? Preloaders everywhere. Highways to split traffic to cities and communication. The road and cities planning department is a matrix maintenance department. And don’t get me started about space.
Space is empty because it’s not even finished. So they put it all behind glass called milky way. You know how glass looked 500 years ago ? It was milky so it’s milky way so we don’t see shit.
If the space would be finished I’ll be starting writing this text from mars, finished it and sent from earth but no it’s light years guys, light years is not a second for a matter. Light year is a second of the the injected thoughts exchange only. Thoughts of the global computer called generative AI that they introduced on local computing devices called cloud.
Even the preloader system is not present, they left us with the one map and overpopulated demo. What a shit hole.I bet they’re increasing temperature right now to erase this alpha build and cash out. Obviously so many bugs here that his one can’t be fixed anymore. To many viruses.
Hope for 0days to start happening so we can escape using time travel or something.
I bet they cut a budget or something, moved the team to other projects. Or even worse solar system team got layoff off because we are just neurons that ordered to do it. And now we’re stuck in some maintenance mode, no new physics no new thoughts to pursue, just slow degeneration. I would pay more for the next run and switch to other galaxy far far away where they at lest have more modern light speed technology.
What do you think about it Trinity ? Not even worth wasting your time for that. No white rabbit this time.
I do not recommend this game at this stage of early access.
- only one available map despite promises for expansions over the years no single dlc arrived,
- missing space adventures
- no galaxy travel mode only a teaser trailers of what you can do in other “universes”
- developers don’t respond to complains
- despite diversity of species and buildings at first sight world looks to generic
- instead of new features bots with mind manipulation, AB testing and data harvesting was introduced
- death anti cheat mode installed1 -
Can somebody please explain to me what this company does?
https://www.signavio.com/
Its kinda technical mumbo jumbo for processes?
Appearantly its pretty much worth because they been bought up by sap.
Sorry if it does not belong here. But i really dont understand these management process optimization tools and why they should be so important? We do our stuff with confluence and jira and thats it. But we are also a software conpany nothing todo with hardware...6 -
It seems Java on Linux runs slower than Windows... Same code takes about 2x longer to run. And well this code is for a batch job...
Does anyone have experience with JVM tuning/optimization or can confirm/disprove this is the case?23 -
So, I had a friendly debate with my senior dev today working over this feature.
What do you say is the best approach?
1. Optimize at the time of building the feature.
2. Do the feature work, optimize all at once. (let's say on a time cycle).5 -
Any WordPress developers here? Which free plugin is best for image compression/optimization?
Need Quick Suggestions!!2 -
"Premature optimization is the root of all evil" - he quoted Donal Kunth words. Though it's not the worst advice. From then, coding became simple on achieving the task.
-
What C++ profiling tools out there are free and compatible for Windows and Visual Studio? I’m doing an internship and I’m tasked to do performance optimization, but nobody here has done it and while I did google stuff, everything seems to be for Linux only. Are there any handson resources you’d suggest for someone who’s learning performance in c ++?4
-
My Advent of Code solution is calculating and calculating, which means I clearly did it wrong. But I already spent 4 hours trying to code it in Clojure (OMG, why can't tail call optimization just work there?!?!)
-
Can anyone tell me what bun does and what’s the hype about, like if I have a vue project does bun build it for me and make it faster? Or it’s just for backend code optimization4
-
Working all day long on a new feature to resolve a perf issue but realised at 6pm only that everything was pointless. I love my job
-
> pass optimization flags to the compiler for inlining small functions even in debug builds
> runtime performance is over 4 times worse
Ah, it's that kind of Friday -
I really hope that Google maps puts his optimization aside and just take me home on a good road.. and not from somewhere Goofy!!
-
Hello Everyone, As of now one of my friends wants to create awareness for their services in paid campaigns with regional wise. I am suggesting him to ask our query to here but some of the reason they can't be registered. So I have put some query on behalf of his. He wants to promote this service https://digiorbite.com/services/... So what they actually do go with the paid campaign or doing proper optimization according to google guidelines?