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 - "minify"
-
While installing Windows 10:
Do you want to enable Cortana?
By enabling Cortana, you agree to share your voice input, typing history, search history, your location...
I think they should just minify this to: you agree to share your life with us.6 -
!Story
The day I became the 400 pound Chinese hacker 4chan.
I built this front-end solution for a client (but behind a back end login), and we get on the line with some fancy European team who will handle penetration testing for the client as we are nearing dev completion.
They seem... pretty confident in themselves, and pretty disrespectful to the LAMP environment, and make the client worry even though it's behind a login the project is still vulnerable. No idea why the client hired an uppity .NET house to test a LAMP app. I don't even bother asking these questions anymore...
And worse, they insist we allow them to scrape for vulnerabilities BEHIND the server side login. As though a user was already compromised.
So, I know I want to fuck with them. and I sit around and smoke some weed and just let this issue marinate around in my crazy ass brain for a bit. Trying to think of a way I can obfuscate all this localStorage and what it's doing... And then, inspiration strikes.
I know this library for compressing JSON. I only use it when localStorage space gets tight, and this project was only storing a few k to localStorage... so compression was unnecessary, but what the hell. Problem: it would be obvious from exposed source that it was being called.
After a little more thought, I decide to override the addslashes and stripslashes functions and to do the compression/decompression from within those overrides.
I then minify the whole thing and stash it in the minified jquery file.
So, what LOOKS from exposed client side code to be a simple addslashes ends up compressing the JSON before putting it in localStorage. And what LOOKS like a stripslashes decompresses.
Now, the compression does some bit math that frankly is over my head, but the practical result is if you output the data compressed, it looks like mandarin and random characters. As a result, everything that can be seen in dev tools looks like the image.
So we GIVE the penetration team login credentials... they log in and start trying to crack it.
I sit and wait. Grinning as fuck.
Not even an hour goes by and they call an emergency meeting. I can barely contain laughter.
We get my PM and me and then several guys from their team on the line. They share screen and show the dev tools.
"We think you may have been compromised by a Chinese hacker!"
I mute and then die my ass off. Holy shit this is maybe the best thing I've ever done.
My PM, who has seen me use the JSON compression technique before and knows exactly whats up starts telling them about it so they don't freak out. And finally I unmute and manage a, "Guys... I'm standing right here." between gasped laughter.
If only it was more common to use video in these calls because I WISH I could have seen their faces.
Anyway, they calmed their attitude down, we told them how to decompress the localStorage, and then they still didn't find jack shit because i'm a fucking badass and even after we gave them keys to the login and gave them keys to my secret localStorage it only led to AWS Cognito protected async calls.
Anyway, that's the story of how I became a "Chinese hacker" and made a room full of penetration testers look like morons with a (reasonably) simple JS trick.9 -
No comments allowed in JSON pisses me off so much.
Sure, I get all the arguments of "it's supposed to be a data-only format for machines", "there are alternatives which support comments", and "you can add comments and then minify the file before parsing"
But right now, when I just need to put a quick note inside a super confusing legacy package manager config about why certain dependencies to be frozen at a specific version, IT FUCKING PISSES ME OFF THAT I CAN'T JUST ADD A FUCKING COMMENT.18 -
Ah finally, the moment when being a web developer is full of joy.
☑️ Server-side rendering
☑️ Inline critical css
☑️ Add progressive image loading
☑️ Minify everything
☑️ Automate release process in CI
☑️ Lint everything
Now that the strucutre is up, time to code the actual website. This is gonna be good!8 -
The company I interned at last summer decided to adopt a JS framework a little over a year ago. The managers went with the old Angular 1.x because they didn't want a JS build process. Each page has ~100 script tags on it, and these are manually included in various files (no automated way to include dependencies). None of the CSS/JS files are minified, either.
They really should have chose Angular 2+, or an entirely different framework (React, VueJS). They're also just now upgrading the codebase from PHP 5.6 to PHP 7.2 (5.6 support ended a long time ago, and security support ends this month).
I love the company itself but these practices are poor.
I may be working there full time eventually. I hope to eventually help with the inevitable transition to a newer framework once Angular 1.x is dead since I am an avid user of newer JS technologies. Any tips on convincing manager(s) towards newer technology? (Or at least convincing them to combine+minify these files in production to reduce # of requests and bandwidth.)
Also this company's product has millions of active users.16 -
So someone wants me to sign a NDA so they can use my open source software (MIT licence) in there software.
They also NEED to minify there php to save on storage and to boost performance. 😂1 -
Want to bundle your files: Node.
Want to minify your scripts: Node.
Want to tree shake your code: Node.
FUUUUUCK OOOOOOOOOOOOOFF I DON'T WANT NODE14 -
So I have been a fly on the "wall" for last couple of months and never signed up, but now here I am!
Rant is about a serious topic - gender gap in tech industry!!
Couple of months ago Stackoverflow announced developer survey results! I was shocked by demographics results! It was disappointing to see biggest gender gap in general tech industry!
I believe tech industry can be the first one to have equal pay for women!
However.... (bad part)
I was going through my twitter feeds and saw this! Many of you have seen this tweet too.
(ohh!fuck I cant attach multiple images here, I should have created Medium post, fuck it!)
"They" continue, quoting from the tweet.
1)"....bias in society is reflected in AI"
2) "However, I do think it is our responsibility as designers/developers/users to be aware of this bias and do our best to correct it."
I want to rant about 2nd one. Some of you may not like it including grammar naziz!
As a developer/programmer I take 2nd one personally! I am currently at denial phase though!
And I have an OCD so gonna make points here!
1) Seriously tell me please, how the fuck you can write gender bias algorithm which can pass a big crazy amount of test suite?
2) Google has done many things for last decade to overcome gender gap related issues. I have met some of the nicest people from Google, and this is really hard for me to believe that google AI or that team has anything to do with the results!
3) Someone suggests use "they" in google translated result, can you fucking imagine how wrong that would be??? If I am developer working on that algo or even in that team and I see this ticket in jira with highest priority where it says, "make all translated results gender neutral using only they" - I would fucking like to die and may be in my next life ask me to do that, when I am a toddler!
4) I am an advocate for equal pay, equal rights and equal opportunities for everyone to "minify" this gender gap in tech, but showing google translate results of a gender natural language to make a point is wrong, it is simply undermining the efforts of something really helpful thing.
5) Moving on to the core point - What can be done to lower down the gender gap? I have seen amazing women who can code/manage far far far better than what I ever could imagine, and they are at really good place and deserve to be there. Are they doing enough to inspire other women to join tech industry?
Collective efforts are very much required. And need to keep in consideration that tech industry is highly competitive roles are also changing rapidly.
6) Many big companies have women at higher positions(CEO, CFO,....) what are their efforts to bring more women in tech industry?
(Some of you may not like this, as this is implying that it isn't only men's job. )
7) Going slightly political here, everyday we see really disappointing news related to women and their rights and health, I strongly believe women don't have to ask for or even have to mention about "equal rights" about anything. Everyone is equal!!!
This is 2017 and still fucked up!
Thats all for today! Heading for breakfast!24 -
I'm surprised how after using gulp task with minify js, css, html, smoosh and compress to gz file the whole web size down from 200kb to 20kb.
That let me think what a shit web developer I'm and what cool are those things.1 -
I got pissed of earlier today cause apparently no ES6 minifier was available on the VS Code Marketplace. We'll, now a few hours later there is one.
https://marketplace.visualstudio.com/...5 -
Not really a rant, but:
Me, programming in unity using C#: well if I add that library, My life will get a little bit easier, but the final APK will be 2MB heavier because of it.
WebDev who never used compiled programming languages: can't you just minify it?
Me:7 -
Just created a custom html, css, js bundler to bundle all my files and minify it to a single file.
Development will be a breeze right now.2 -
PM: This is broken.
Me: What? It works locally. That's weird...
PM: ...............
Me: (5 mins later) ok try again.
PM: still broken.
Me: Bangs head on desk. Why is this working locally?!?!!?
Me: (3 hours later) I'm missing a semi colon, and it wouldn't minify. Awesome.2 -
>building the same app once again because of a bug
>look in the unity editor settings for android
>find "proguard"
>google it, find it might be useful to minify, obfuscate code and other stuff
>try to minify the shit of the app
>original app was 25.1MB
>minified app is 24.6MB
>minified app using "Gradle (Experimental)" is 24.5MB2 -
I have an idea and I want some feedback.
I'm the only web developer and I've been updating our systems so they can be maintainable. Previously we have used Wordpress for landing pages which is complete overkill So here's the idea:
Static sites for landing pages and any forms that would need to filled out would be on a separate site.
Ok so here me out. First the landing pages barely need any maintenance so using pure HTML/CSS/JS wouldn't be a problem. This means I can strip away all of the crap from Wordpress and make the load times faster. Second all of the landing pages forms would be hosted in a single place making analytics easier for the reporting system.
Really I just despise Wordpress and am trying any practical reason to not use it as much as possible. Oh and don't worry I'll use preprocessors and minify the production files.7 -
So we got a new Front-End intern today.
My senior was demonstrating to her how to minify and beautify JavaScript codes.
And I'm like WTF dude she has worked with Front-End technologies and she knows that.
And who the fuck beautifies and again minify jQuery script. Totally idiot.2 -
Tldr: I think I made a company fire some dev a year ago.
I was working for this company remotely, alone, on a very big and old legacy php project where they still used echo '<code><code/>'; and i was a very junior junior front end developer, needed to make the website work somehow (whole new design). They brought in a random guy to work with me, and we started working.. I was using bitbucket to version my changes, and I asked him to do the same. He tried pushing his changes once and then practically never again because he started working in files that i was working on and there were git conflicts, and he gave up, even though i asked him to do that... he then statted using general classes to style the page (like .color) with absolute positioning and it broke everything everywhere. He then proceeded to minify half of the php files 'because of performance', I remember talking to other few people in the company and he disappeared a few more days later. I never finished the project because they stopped it randomly and i think i got him fired even though he could've continued working in the company -
Hi friends and others. There is a task I want to automate. I want to convert .docx files to .pdf and then minify those. Are there JavaScript libraries or npm- packages which can do that? Because I would like to use Gulp or Webpack for this task. I would not mind if external APIs are involved, but I would rather not use those if not required.
Pls share your wisdom. Bye.2 -
For the last time, ES5 DOESN'T support optional function parameters. gulp --production fails when running on testing when you do that.
*fixes gulp tasks to do gulp --production by default*
Next day : hey, why does gulp keep failing.
IT IS BECAUSE YOU DIDN'T LISTEN TO ME THE LAST 100 TIMES WHEN I SAID OPTIONAL PARAMETERS DOESN'T WORK WHEN MINIFYING
Let's see how you do it now.3 -
Question: We are planning to transition our old ES5 codebase to modern ES6/ES7 and even typescript.
What would be the build tool you would recommend if we want to start supporting ES6/ES7 and even Typescript?
Webpack, Vite some other?
This is a vanilla Javascript Project with large codebase it's been built using custom build tools like UglifyJS and UglifyCSS and of after lots of begging it finally got the green light to move to a more modern build tool and start supporting a more standard JavaScript Features.
Mainly I want to move to TypeScript but transition would be slow so the build tool would need to support .ts and .js as well, that is traspile both the .ts and .js into one final production build.
What build tool would you recommend for that?8 -
So for the past day I've been obsessed with adding compression into my build pipeline for web dev, I've implemented html minify, babel JS minify, gzip and made the server specify content length to prevent chunking and shave off a few unused bytes. Is there anything else anyone can think of to get even more gains? Sofar my project went from 1.33mb to 180kb transferred. It's a huge win, just wondering if I can push it further somehow?1
-
When gulp build (expressjs + browsersync + browserify + uglify + gzip + gulp-zip + gulp-tar) perfectly compiles your code, minify and concat all js, gzipped them, minify images, package the files into a .zip and .tar... and refresh your browser 😍
you begin to have faith that its gona be a nice day ahead -
How hard can it fucking be to just bundle, minify and compress css and js in webpack.
FFS, am I retarded? -
currently I'm kinda lost in web dev, particularly WordPress themes. As I'm knew to this stuff, I feel I'm going to the wrong direction.
I don't know how to properly make a website, until know I've been doing it all by hand, but as I stated theming, I started using sass, auto prefixes, minify (js|css) and I'm wrapping all this with GNU make.
I'm certain this seems wrong, but what should I do??5 -
I hate to work on old projects with gulp.
console.log('assigning obejct to customer', {custID, itemID});
events.js:174
throw er; // Unhandled 'error' event
^
GulpUglifyError: unable to minify JavaScript
thanks..... -
So I have this gulp task to minify javascript but it doesn't actually do that, It minifies in a single line which is actually correct, but it doesn't convert if/else into ternary and true/false to !0/!1?
> Gulp Task: https://pastebin.com/1d8k8juX -
People! Do you know if there is something similar to gulp and modules like minify, uglify, smooth, etc (for HTML, CSS and JS) that runs in Python instead of nodejs? I can't install nodejs/npm in my job because "open source software is dangerous" :)10