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 - "csp"
-
Me: PHP, please load the images.
PHP: No.
Me: Come on PHP, the deadline is tonight.
PHP: Haha nope.
Me: What if I swap the libraries?
PHP: Still no.
Me: What if I add a symlink?
PHP: No. And also I hate you.
Me: *gives up and sends an email to the client saying we have to delay the release*
PHP: lololol jk here's the images haha
Me: :/13 -
So I dual booted my pc with Ubuntu a few weeks back. And I came to a conclusion today.
Um, windows needs to go.23 -
Initial steps of learning any new programming language :
*heck yeah I created a calculator. Guess I'll show my family that I actually can code! *
-hey mom, dad look I made a simple calculator using python B)
- uhm... That's great son but dont we already have one of those?
- yeah but like... this is completely different it uses a different programming language than what you and I have been using all this time.
- ah I see. Good for you then
*muttering to each other*
-are you sure he's got the aptitude to be a cse?
-at this point we can just hope.
Me:*stares blindly in my dark room contemplating why I'm alive*7 -
Wanted to make a website with some of my friends about whatever kid thing we were into at the time. None of our parents cared, it was the 90s and nobody took the internet seriously.
Copied and pasted bits of html into notepad and FTPed them to some free webhost over dialup. The website lasted three weeks -- my friends got bored, I got hooked.
A few years later I found myself wondering why some websites used ".php" instead of ".html". I discovered this shiny new thing called PHP 4. Built a website for some video game I was into using it. Spent the next two years teaching myself everything there was to know.
Took programming in high school. Chose CS over mechanical engineering because I liked the university better. Got an internship which turned into a job which turned into a career.1 -
End of second week at a new job. Found what I thought was a bug and wanting to impress I fixed it. The dev reviewing my code had just started a week before me so he also had no idea what was going on. It went live Friday afternoon.
Come back Monday morning and turns out I completely broke everything and nobody could use the site all weekend. I thought I was done for sure. Was shitting myself all day waiting for the call.
TURNS OUT NOBODY EVEN NOTICED4 -
So we're hiring for a new junior dev and for the most part it's been going great! We have some promising candidates and I am so glad to finally have a new dev on the team!
However, I would like to take a moment and offer a few suggestions to the people who wish to work for this great and illustrious company:
PLEASE PLEASE PLEASE APPLY FOR THE JOB USING THE METHOD INDICATED IN THE AD. Please use our fancy, top-of-the-line, whiz-bang, cloud-based "talent acquisition" system that we paid way too much money for. I promise you, it's easy! Please don't send in your application by email, mail, telephone, Facebook, Twitter, Instagram, Snapchat, telegram or carrier pigeon. But most importantly...
FOR THE LOVE OF ALL THAT IS BEAUTIFUL IN THIS WORLD DO NOT SHOW UP AT OUR OFFICE UNANNOUNCED RESUME-IN-HAND. Believe it or not I do have an actual job that I spend my day doing! If I'm not in a meeting or at lunch or working from home, the best possible scenario is that you'll get 30 seconds of awkward small talk and be pointed to our whiz-bang, top-of-the-line "talent acquisition" system which you should have used in the first place (you did read the ad, right?). And at this point whatever you do...
DO NOT DEMAND AN ON-THE-SPOT INTERVIEW WHEN YOU SHOW UP UNANNOUNCED TO OUR OFFICE! Like, really? Do you think that you've wowed me so with your 30 seconds of awkward small talk that clearly I cannot wait to see what you will do with an entire hour? Look, I prepare for my interviews. I research you, your previous employers, your school and the hobbies you list on your resume. I check out your GitHub and LinkedIn. I may even Google your name! If that is all in order, I try to hassle some people into sitting in with me, find a time that works for everyone, and hope that there is a meeting room available. I'm not going to interview you at reception at 4pm on a Friday afternoon.
Please submit your application through our whiz-bang, top-of-the-line online "talent acquisition" system. Once I figure out how to log in, I promise I will spend an evening and read through all your cover letters with the utmost care. If you seem OK, you'll get an interview. There aren't that many developers in this town.7 -
It is once again that time of year when we say farewell to our current interns and say hello to a brand new batch.
The two groups overlap for a few days. During this time the old interns show the new interns the ropes, while the mentors silently weep in the lunchroom having realized that nothing that they've said over the last 12 months has had any effect whatsoever.
Some choice quotes:
---
New Intern: It says 'uncaught exception'.
Old Intern: Oh don't worry that will fix itself on production.
---
OI: Did you pull the code?
NI: Yeah, but I have all these weird brackets everywhere... [merge conflict]
OI: Oh yeah that happens sometimes, just delete them.
---
NI: It says "push to master rejected". [we enforce code reviews]
OI: Ohh that means the server is broken. You should tell someone, they have to reboot it.
---
NI: Where did that file save to? [we use ONLY macOS and Linux]
OI: C:\Users\<your name>\My Documents\...
---
OI: You can use either pgAdmin or MySQL Workbench. I like Workbench better but I couldn't get it to work, it kept giving me errors.
---
And of course...
---
OI: No, we don't use Linux. We use CentOS.
---
I did the math today. Only 35 more years and I can retire.5 -
@Fast-Nop This one's for you, buddy. Took me all freaking day to figure out how to avoid unsafe-inline when registering a service worker. XD7
-
! rant
Sorry but I'm really, really angry about this.
I'm an undergrad student in the United States at a small state college. My CS department is kinda small but most of the professors are very passionate about not only CS but education and being caring mentors. All except for one.
Dr. John (fake name, of course) did not study in the US. Most professors in my department didn't. But this man is a complete and utter a****le. His first semester teaching was my first semester at the school. I knew more about basic programming than he did. There were more than one occasion where I went "prof, I was taught that x was actually x because x. Is that wrong?" knowing that what I was posing was actually the right answer. Googled to verify first. He said that my old teachings were all wrong and that everything he said was the correct information. I called BS on that, waited until after class to be polite, and showed him that I was actually correct. Denied it.
His accent was also really problematic. I'm not one of those people who feel that a good teacher needs a native accent by any standard (literally only 1 prof in the whole department doesn't), but his English was *awful*. He couldn't lecture for his life and me, a straight A student in high school, was almost bored to sleep on more than one occasion. Several others actually did fall asleep. This... wasn't a good first impression.
It got worse. Much, much worse.
I got away with not having John for another semester before the bees were buzzing again. Operating systems was the second most poorly taught class I've ever been in. Dr John hadn't gotten any better. He'd gotten worse. In my first semester he was still receptive when you asked for help, was polite about explaining things, and was generally a decent guy. This didn't last. In operating systems, his replies to people asking for help became slightly more hostile. He wouldn't answer questions with much useful information and started saying "it's in chapter x of the textbook, go take a look". I mean, sure, I can read the textbook again and many of us did, but the textbook became a default answer to everything. Sometimes it wasn't worth asking. His homework assignments because more and more confusing, irrelavent to the course material, or just downright strange. We weren't allowed to use muxes. Only semaphores? It just didn't make much sense since we didn't need multiple threads in a critical zone at any time. Lastly for that class, the lectures were absolutely useless. I understood the material more if I didn't pay attention at all and taught myself what I needed to know. Usually the class was nothing more than doing other coursework, and I wasn't alone on this. It was the general consensus. I was so happy to be done with prof John.
Until AI was listed as taught by "staff", I rolled the dice, and it came up snake eyes.
AI was the worst course I've ever been in. Our first project was converting old python 2 code to 3 and replicating the solution the professor wanted. I, no matter how much debugging I did, could never get his answer. Thankfully, he had been lazy and just grabbed some code off stack overflow from an old commit, the output and test data from the repo, and said it was an assignment. Me, being the sneaky piece of garbage I am, knew that py2to3 was a thing, and used that for most of the conversion. Then the edits we needed to make came into play for the assignment, but it wasn't all that bad. Just some CSP and backtracking. Until I couldn't replicate the answer at all. I tried over and over and *over*, trying to figure out what I was doing wrong and could find Nothing. Eventually I smartened up, found the source on github, and copy pasted the solution. And... it matched mine? Now I was seriously confused, so I ran the test data on the official solution code from github. Well what do you know? My solution is right.
So now what? Well I went on a scavenger hunt to determine why. Turns out it was a shift in the way streaming happens for some data structures in py2 vs py3, and he never tested the code. He refused to accept my answer, so I made a lovely document proving I was right using the repo. Got a 100. lol.
Lectures were just plain useless. He asked us to solve multivar calculus problems that no one had seen and of course no one did it. He wasted 2 months on MDP. I'd continue but I'm running out of characters.
And now for the kicker. He becomes an a**hole, telling my friends doing research that they are terrible programmers, will never get anywhere doing this, etc. People were *crying* and the guy kept hammering the nail deeper for code that was honestly very good because "his was better". He treats women like delicate objects and its disgusting. YOU MADE MY FRIEND CRY, GAVE HER A BOX OF TISSUES, AND THEN JUST CONTINUED.
Want to know why we have issues with women in CS? People like this a****le. Don't be prof John. Encourage, inspire, and don't suck. I hope he's fired for discrimination.11 -
I have an exam in 4 hours. I've been studying all night and now I can't seem to retain anything.
I'm fuckin screwed.10 -
...when you find yourself circumventing your own security measures that you lectured the entire team about...1
-
After working with a coworker on some odd issues, I finally decided to check on the actual ticket he needed assistance with.
From now on, we will optimize our HTML for aesthetic appeal in Chrome's dev tools. display:none is verboten.
Sometimes I wonder if I've had a stroke or if I've died and am in purgatory. -
Okay but
Webextensions api can go fuck itself with an exhaust pipe
Ive been debugging for a fucking day because apparently a script that i embed in a site doesnt have the same csp as the fucking site3 -
If for some reason you decide to write a shim for a VERY COMMON LIBRARY in your project:
1. DON'T
2. If you decide to ignore (1), at least make sure the SHIM WORKS THE SAME WAY AS THE LIBRARY
Two days of debugging sudden untraceable errors led me to find that a .so wasn't copied correctly during maintenance. fml -
1. Sets up Airbnb listing for Mom
2. Domain check
3. Email check
4. Okay let’s setup a simple one-pager that we can share
*Uses html5 broilerplate and embeds Airbnb listing - simple*
Checks page, it comes up blank...
WTF!!!??? WHY!? *Checks Console: 1 million errors screaming about Content Security Policy*
Sigh, I can deal with logic errors in backend code. WebDev is just so full of esoterics and gotchas that have nothing to do with you business logic. They make really simple and trivial shit way more painful and harder than they need to be... Ugh3 -
Just dropping some current experience here.
Content security policies are big mess in both chrome and firefox.
Chrome has some 4 years old "bug" where you can't add hash of JS file to 'style-src' policy to permit inline-styles THAT would be set by this script (jQuery actually).
Firefox is beautifully unhelpful, it just pops of error "blocked ..something..", not even saying what it was.
EDIT:
And I am missing a pair of some steel balls to ask about this on SO because there is this much of very similar questions, nonetheless -if I did read them right- every one of them is talking about enabling style attribute, and that's something different.
EDIT2: Chrome currently generates 138 errors "jquery-3.4.0.min.js:2 Refused to apply inline style..." , this ain't hitting production.10 -
CSP-Style-Concurrency is so freaking awesome.
You can just split your application into independent modules that communicate with channels. -
CSP: the thing that finally makes me jump out a window.
It's not that it's bad per se... well, I mean, it is, in several ways... but I can cope with it.
But when you're being pushed to apply a very strict policy to an app that is (a) itself 10 years old (predating CSP and most modern practices entirely you'll note), (b) has code that originally came from a 15-year old app at its core, and most critically (c) uses a third-party library that is at the very heart of it all and that simply can't ever play nice with CSP due to its fundamental nature... well... that's a recipe for an awful lot of head-meet-wall.
And you're not going to do a ground-up rewrite of an app that cost literally millions to develop (and is constantly being grown to this day) and which is now mission-critical and very highly regarded by the most important clients.
FML. -
Dahhhhhh. Retrofitting CSP to an established, legacy site with inline scripts and random CSS/js loaded from all over the place is damn stressful.
Why did I volunteer to sort this crap out... What a pleb.4 -
Fuck the sockets.
Fuck the secure sockets.
Fuck that CSP rule in our proxy conf.
Fuck the self script hashed.
After fix everything....
Fuck THEIR proxy that didn't allow wss.
PS iheartsockets! -
Seriously.. CSP for a bug tracker site.... not really a good idea....
http://bugs.chromium.org/p/...
Site is TOTALLY broken due to CSP....