Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Finally working on rewriting the core of our internal platform on CakePHP 3.
It feels so good leaving the legacy codebase behind!4
XSS mitigation is a pain in the ass.
After all this time, with all the brilliant developers around the world, why haven't we found a sane way to mitigate this shit by default?
Hey there devRant, how many of you have experience with large scale meteorJS deployments?
Is it reliable? What was your approach in structuring your app and infrastructure?
Thanks in advance :)1
Last Friday I banged my head on this search engine algorithm that I was working on that was not indexing properly. For 2 freaking hours I was stuck on this one bug, until I gave up.
Yesterday I went at it again. Took me 5 minutes to fix the bug and finish the changes.
The power of a rested mind...4
That time I almost distroyed everything... (we've all had at least one of those, don't you dare deny it)7
I was thinking about the problems one of our clients faced with the launch of their project the other day, because things were rushed, stuff was omitted and in the end they could not meet the launch date, and I started making a list of hard lessons I learned over the years that would have helped them avoid this situation.
Feel free to add yours in the comments.
- Never deploy on Friday
- Never make infrastructure changes right before a launch
- Always have backups. Always!
- Version control is never optional
- A missed deadline is better than a failed launch
- If everything is urgent, nothing is important
- Fast and cheap, cheap and quality, quality and fast. Only one pair at a time can be achieved
- Never rush the start or the end of a project
- Stability is always better that speed
- Make technical decisions based on the needs of the project two years from now
- Code like you will be the only maintainor of the project two years from now. You probably will...
- Always test before you deploy
- You can never have too many backups (see above)
- Code without documentation is a tool without instructions
- Free or famous does not necessarily mean useful or good
- If you need multiple sentences to explain a method, you should probably refactor
- If your logic is checked beforehand, writing the code becomes way easier
- Never assume you understand a request the first time around. Always follow up and confirm
There are many more that should be on this list, but this is what came to mind now.2
A single fucking CSS SELECTOR has over 12000 characters !!!!
JUST THE SELECTOR !!!
Just to add `color: #ffc311;` to a bunch of fucking elements !!!
WHAT THE ACTUAL FUCK !!!
Why not create a fucking class like `color--orange` and add that on all the elements you need to have that color, at least !!
THIS IS A FUCKING NIGHTMARE !!!15
I really hate fucking Wordpress!
I hate it's stupid API, with it's stupid hooks and actions and all those stupid functions and no fucking logic to any of it!
I hate it's stupid plugin system, with all that fucking overhead that brings no real value and adds all that complexity for nothing!
I hate stupid fucking multiple calls for the same fucking assets, loading them over and over again because every stupid plugin calls them again and again!
I hate motherfucking SHORTTAGS, or whatever the fuck they are called!
I hate that every stupid fucking plugin and shortcode and fucking every little fucking piece of HTML comes from a different fucking place, with different fucking structure and different fucking classes and stupid fucking loading seaquences that make no fucking sense!
And I hate fucking page builders !!!!!
I should be fucking coding on this fucking peace of shit, but I just cannot fucking take it any more!!!
IT NEEDS TO FUCKING DIE!
It should be relegated to the darkest corners of the internet and all the servers that have it's fucking code anyware on their systems should be disconnected and buried in the deepest pits of hell, just to be sure it never, EVER, surfaces again!!!
Saturday night coding to make a deadline for a Wordpress website that needs to launch on monday...
I hate Wordpress!!!! Did I ever mention it?
Ok, now back to work!7
I have been using CakePHP 1.3 and 2.x fore some years. I built two custom platforms on them that we used for almost every project at work, and also some of my freelance ones.
We've built all kind of stuff, from basic CMS to large scale CRM/ERP systems, and it held it's own!
But now I wanna build another one! :D
I wanna build a platform on CakePHP 3.x fore sume time at work, but the constant flow of projects leaves little time for this.
And I am not talking about the shitty stuff like the sorry attempts you can find oh GitHub right now, that I never even managed to use once for a real project (I really tired!), I am talking about a real platform, for real world projects, with a real world interface, and real world functionallity, for real world use cases!
I was thinking to start an open source project, but I never managed one so I have some concerns...
Like it will not get any contributors and I will eventually do it on my own anyway, or like it WILL get traction and I will not be able to manage the project, or the community.
I am the head of the dev dept at work, but open source seems like a whole new ball game for me...
Anyway, what do you people think? Would you work on something like that? Would you use it? Should I create a GitHub project and add a collab? Or is it doomed already?
TL;DR: disaster averted!
About a year ago, the company I work for merged with another that offered complementary services. As is always the case, both companies had different ways of doing things, and that was true for the keeping of the financial records and history.
As the other company had a much larger financial database, after the merger we moved all the data of both companies on their software.
The said software is closed source, and was deployed on premises on a small server.
Even tho it has a lot of restrictions and missing features, it gets the job done and was stable enough for years.
But here comes the fun part: last week there was a power outage. We had no failsafe, no UPS, no recent backups and of course both the OS and the working database from the server broke.
Everyone was in panic mode, as our whole company needs the software for day to day activity!
Now, don't ask me how, but today we managed to recover all the data, got a new server with 2 RAID HDDs for the working copy of the DB, another pair for backups, and another machine with another dual HDD setup for secondary backups!
We still need a new UPS and another off site backup storage, but for now...disaster averted!
Time for a beer! Or 20...
That is all :)4
So, I am in the last stages of development of a really big project and I need to figure out a way to package future patches and updates for the client in order for them to manually update the project on prod server.
For reasons I cannot specify here, they will not use any automated process, and we need to provide regular patches and updates for the next year.
So I was thinking of using git archive to package changed files from our repo for every new commit, or series of commits, and just give them that, along with any database schema updates as sql files (again, no automation can be used).
We are talking about a large PHP + MySQL app, and cannot use automated deployment strategies.
I feel there must be a better way to do this, but this is the best I could come up with so far.
What do you people think?
Old story, and yeah, it's all true, I shit you not!
So here I am at about age 11 (more or less). At the time, I had an almost brand new 333MHz beast, with 8 MB RAM, 2 (!!!) MB video card and (I think) about 300 MB of storage (yeah, I'm old :)) ).
Connected to this monster was sitting a 14" CRT monitor, mechanical keyboard and a 2 button, ball "powered" mouse.
There was no optical tracking tech at the time.
One evening, I notice my mouse starts lagging. Test it to see if Win95 is stuck. Nope, just mouse problems...
Fiddle with it a little, and at some point it stops working at all.
My room was dark now, so I got up to turn on the lights, sat down in front of the PC, and moved the mouse by instinct.
Surprise! It's working again!
My brother comes in and turnes off the lights. Mouse non responsive.
I tell him to turn them on again, mouse works again.
At this point, we were both scratching our heads at this mystery...
I decided to confirm it again using a desc light.
Conclusion: my 2 button, ball tracking, non light sensitive mouse was working only if light was shining directly oh it AND on my 14" crt monitor at the same time!!!
To this day I have no ideea why.
I kept them both for posterity, and they are still there in my parent's attic.
Frontend double standards: havind two CSS frameworks on THE SAME FREAKING PROJECT, with arbitrary usage!!!!11one5
Last week some Client Service broad called my team the equivlent of "code monkeys" to my face.
I was THIS close to bitchslap the bitch!
Today I just told her I would pass the next two of her projects to my "code monkeys". I could see the despair in her eyes :)1
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
I know this is utopic, but I've been thinking for a while now about starting an open source platform for figuring out the problems of our society and finding real world, applicable, open source solutions for them.
To give you some more details, the platform should have two interfaces:
- one for people involved in researching, compiling issues into smaller, concrete chunks that can be tackled in the real world, discuss and try to find workable solutions for the issues and so on
- one for the general public to search through the database of issues, become aware of the problems and follow progress on the issues that people started working on
Of course, anyone can join the platform, both as an observer (and have the ability to follow issues they find interesting) and/or contributor (and actually work with the community to make the world a better place in any way they can).
Each area of expertise would have some people that will manage the smaller communities that would build around issues, much like people already do in the open source community, managing teams to focus on the important thins for each issue. (I haven't found a solution for big egos getting in the way yet, but it would be nice if the people involved would focus on fixing stuff in stead of debating about tabs vs spaces, if you know what I mean).
The goal of this project would be to bring together as many people from all kind of fields to actually try to fix this broken society.
It would be even better if it attracted people with money and access to resources (one example off the top of my head being people like Elon Musk) that could help implement the solutions proposed by the community without expecting to gain profit off of it (profit is also acceptable if it is made in a considerate, fair and helpful way, but would not be promoted on the platform).
The whole thing would be voluntary work; no salary, no other commitment than the personal pledge that once someone chooses to tackle something, he/she will also see it trough (or at least do his/her best).
The platform would be something like a mix of real time communication, issue tracker, project management tool and publishing platform.
I don't yet have all the details for how it should all fit together, but if there is something that I would like to start, this is definitely it!
PS: I don't think I can ever do something like this by myself, and I don't really have the time to manage a community of developers to start work on it right now. But if you guys think something like this is something worth your time, I will make time and at least start on defining the architecture and try to turn this into a real project.
If enough people are interested, I will drop any other side projects and do my best to get this into the world!
Thank you for reading :)6
That moment when there are no more new rants, you check algo, latest and read all top and you just sit there lookong at the screen...
(inner self: start working on your side projects !!!!)
Just thought of a cool feature for devRant: rant it later!
I get why the 2 hours limit between rants exists, but it would be so cool to write a rant and the app to self post it after the 2 hours limit expires!
And it could also give a notification that the rant was posted.
What do you think?8
I really felt like a badass one time when I managed to recover all projects on our dev server after a full meltdown of the HDD.
We had no recent backups, because our backup server was down for a few months, and our (at the time small) company was in a tight spot on finances, and couldn't get a replacement.
The problem was that the HDD on the backup server failed, but we were storing all projects also on the dev server, along with our local git repos (no GitHub at the time for us), but then the dev server HDD also broke, and I used every piece of data recovery software I found trying to recover the data, until one actually managed to read the raw data from the HDD and store it as a virtual drive, that I then used to try and build another partition index and it actually worked!
Lost about 10% of the data, but that was enough, as i managed to recover all the git repos and databases...
I don't even remember the tools that got the job done in the end, but that was one hell of a week, and at the end I felt like a true IT God!
PS: 2 weeks later we had a new backup server, another offsite backup solution and a GitHub account for the company. Was delayed on salary in order to manage it (me and the CEO both agreed to give our pay for one month to get them), but worth it!2
I just realized I have two posts with over 20 ++...
Someone told me in a previous rant's comment that I should mail David to get stickers...
But...who is David again? How does this thing work?
😂 😂 😂 😂 😂 😂
I fail at devRant... :))9
Hello, I am stuck working on a project built on top of CakePHP 1.3 and I have some custom helpers, one of them named Order; for my views, I need to set a variable $order to contain the order data.
My problem is that if I set the variable in the controller ( $this->set(compact('order)); ) it overwrites the helper instance ( $this->Order ), and if I set it with a different name in the controller (say $_order) and reassign it in the view file ( $order = $_order ), the helprr instance ( $this->Order ) is also overwritten...
I really need to have the namings as described in order for my code to be clean and logical.
Could it be that devs using spaces over tabs actually send secret messages in morse code to each other while indenting?
!rant (maby rant?)
I live in a place where there is very low discrimination, and even if people make rasist, or sexist, or possibly discriminating remarks, 90% of the time they are just shrugged of or laughed at by the "offended" party.
Then I read stuff from around the world and I am just amazed by the lack of tolerance the rest of the world seams to have.
Like getting offended by people stating any little, insignificant, unrelated thing...even to the point of legal action...
Why are people so easly offended? I get history and past repressions and inequality, but in most cases these reactions are just tantrums or just being a pussy (no matter the actual gender).
Lighten up, people!