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 - "html request"
-
One of our web developers reported a bug with my image api that shrunk large images to a thumbnail size. Basically looked like this img = ResizeImage(largeImage, 50); // shrink the image by 50%
The 'bug' was when he was passed in the thumbnail image and requesting a 300% increase, and the image was too pixelated.
I tried to explain that if you need the larger image, use the image from disk (since the images were already sized optimally for display) and the api was just for resizing downward.
Thinking I was done, the next day I was called into a large conference room with the company vice-president, two of the web-dev managers, and several of the web developers.
VP: "I received an alarming email saying you refused to fix that bug in your code. Is that correct?"
Me: "Bug? No, there is no bug. The image api is executing just as it is supposed to."
MGR1: "Uh...no it isn't. Images using *your* code is pixelated and unfit for our site and our customers."
MGR2: "Yes, I looked at your code and don't understand what the big deal is. Looks like a simple fix."
<web developers nodding their heads>
Me: "OK, I'll bite. What is the simple fix?"
<MGR2 looks over at one of the devs>
Dev1: "Well, for example, if we request an image resize of 300, and the image is only 50x50, only increase the size by 10. Maybe 15."
Me: "Wow..OK. So what if the image is, for example, 640x480?"
MGR1: "75. Maybe 80 if it's a picture of boots."
VP: "Oh yes, boots. We need good pictures of boots."
Me: "I'm not exactly sure how to break this to you, but my code doesn't do 'maybe'. I mean, you have the image from disk.
You obviously used the api to create the thumbnail, but are trying to use the thumbnail to go back to the regular size. Why not use the original image?"
<Web-Dev managers look awkwardly towards the web devs>
Dev3: "Yea, well uh...um...that would require us to create a variable or something to store the original image. The place in the code where we need the regular image, it's easier to call your method."
Me: "Um, not really. You still have to resolve the product name from the URL path. Deriving the original file name is what you are doing already. Just do the same thing in your part of the code."
Dev2: "But we'd have to change our code"
Mgr2: "I know..I know. How about if we, for example, send you 12345.jpg and request a resize greater than 100, you go to disk and look for that image?"
<VP, mgrs, and devs nod happily>
Me: "Um, no that won't work. All I see is the image stream. I have no idea what file is and the api shouldn't be guessing, going to disk or anything like that."
Dev1: "What if we pass you the file name?"
<VP, mgrs, and devs nod happily again>
Me: "No, that would break the API contract and ...uh..wait...I'm familiar with your code. How about I make the change? I'm pretty sure I'll only have to change one method"
VP: "What! No...it’s gotta be more than that. Our site is huge."
<Mgrs and devs grumble and shift around in their chairs>
Me: "I'm done talking about this. I can change your code for you or you can do it. There is no bug and I'm not changing the api because you can't use it correctly."
Later I discovered they stopped using the resize api and wrote dynamic html to 'resize' the images on the client (download the 5+ meg images, and use the length and width properties)22 -
Frack he did it again.
In a meeting with the department mgr and going over a request feature *we already discussed ad nauseam* that wasn’t technically feasible (do-able, just not worth the effort)
DeptMgr: “I want to see the contents of web site A embedded in web site B”
Me: “I researched that and it’s not possible. I added links to the target APM dashboard instead.”
Dev: “Yes, it’s possible. Just use an IFrame.”
DeptMgr: “I thought so. Next sprint item …what’s wrong?…you look frustrated”
Me: “Um..no…well, I said it’s not possible. I tried it and it doesn’t work”
Dev: “It’s just an IFrame. They are made to display content from another site.”
Me: “Well, yes, from a standard HTML tag, but what you are seeing is rendered HTML from the content manager’s XML. It implemented its own IFrame under the hood. We already talked about it, remember?”
Dev: “Oh, that’s right.”
DeptMgr: “So it’s possible?”
Dev: “Yea, we’ll figure it out.”
Me: “No…wait…figure what out? It doesn’t work.”
Dev: “We can use a powershell script to extract the data from A and port it to B.”
DeptMgr: “Powershell, good…Next sprint item…”
Me: “Powershell what? We discussed not using powershell, remember?”
Dev: “It’s just a script. Not a big deal.”
DeptMgr: “Powershell sounds like a right solution. Can we move on? Next sprint item….are you OK? You look upset”
Me: “No, I don’t particularly care, we already discussed executing a powershell script that would have to cross two network DMZs. Bill from networking already raised his concern about opening another port and didn’t understand why we couldn’t click a link. Then Mike from infrastructure griped about another random powershell script running on his servers just for reporting. He too raised his concern about all this work to save one person one click. Am I the only one who remembers this meeting? I mean, I don’t care, I’ll do whatever you want, but we’ll have to open up the same conversations with Networking again.”
Dev: “That meeting was a long time ago, they might be OK with running powershell scripts”
Me: “A long time ago? It was only two weeks.”
Dev: “Oh yea. Anyway, lets update the board. You’ll implement the powershell script and I’ll …”
Me: “Whoa..no…I’m not implementing anything. We haven’t discussed what this mysterious powershell script is supposed to do and we have to get Mike and Bill involved. Their whole team is involved in the migration project right now, so we won’t see them come out into the daylight until next week.”
DevMgr: “What if you talk to Eric? He knows powershell. OK…next sprint item..”
Me: “Eric is the one who organized the meeting two weeks ago, remember? He didn’t want powershell scripts hitting his APM servers. Am I the only one who remembers any of this?”
Dev: “I’m pretty good with powershell, I’ll figure it out.”
DevMgr: “Good…now can we move on?”
GAAAHH! I WANT A FLAMETHROWER!!!
Ok…feel better, thanks DevRant.11 -
That sad sad moment you spot someone returning HTML in an ajax request 🥺
Why lord must you punish me?11 -
The Perfect Storm:
My worst coding mistake? Yeah, let me tell you about that. I pushed a simple JavaScript/HTML change without knowing that the stupid header was shared with another "not so important" section of the site called "My Account" where people go to pay for their services. I call it the perfect storm because I left early that Friday for a weekend cruise and right before leaving I pushed the change, sent the request to push for production and left. When they noticed that clients were complaining about not being able to pay they started reversing most changes of all teams trying to fix it but they never touched mine because they knew I wasn't working on the backend. My whole team worked over the weekend trying to find the issue while I was having fun in the cruise. They ended up reversing all changes by Sunday night and it took us about 4 more days to figure out that my simple JavaScript/HTML change broke the site and prevented 30 million customers from making payments that weekend plus it broke the whole 2nd release of the month.... yeah, nothing major.21 -
TABLE BASED WEB DESIGN
I was surprised there were no rants about this topic before I realized it was more than a decade back 😳
We've never had it better! So to help add a little perspective for all those ranting about what is unarguably the golden age for web developers... let me fill you in on web dev in the late 90's;
JavaScript was a joke. No seriously! - I once got laughed out of the room for suggesting we try use it for more than disabling a button - (I wanted to check out the new XHR request thingy [read AJAX]).
HTML was simple and purely a markup language (with the exception of the marquee tag). The tags were basically just p,ul,ol,h*,form inputs,img and table and html took 10 minutes to learn. Any style was inline and equally crude - anything that wasn't crude could not be trusted and probably wouldn't render at all in most browsers (never mind render correctly).
There were rumors of a style TAG and something called a cascading style sheet which were received with much skepticism since it went against the old ways and any time saved would be lost writing multiple [IE version specific] style sheets for each browser just to get it to work - so we simply didn't.
No CSS meant the only tags you had to work with to create a structured layout were br, hr and table... so naturally EVERYTHING was in nested tables! JS callback hell can't touch this! - it was not uncommon to have 50+ nested tables all with inline style in a single page which would be edited without any dev tools or linting.
You would spend 30 minutes scanning td tags until your eyes bled to find something, make a change, ftp the file to the server, reload the web page and then spend 10 minutes staring at the devastation on your screen convinced you broke
the internet before spotting an un-closed td tag with your bloodshot eyes.
Tables were not just a silver bullet - they were the ONLY bullet and were in the wild west!
Q: Want an inline form or to align your inputs left?
A: Duh table!
Q: Want a border with round-corners, a shadow or blur?
A: That's easy! Your gonna want to put that table in the center cell of another table then crop a image of the border into 6 smaller images to put in the surrounding cells... oh and then spend 10 minutes fucking with mystical attributes like cell-padding and valign to get them flush.
...But hey at least on the bright-side vertically & horizontally centering stuff was a breeze!22 -
Manager: The site I loading too slow. How can we improve this?
Me: *f5 & look at the network log* the server is taking too long to respond some image requests. We could encode them into the Html to have them all delivered in a single request.
Manager: GTMetrix says we need to compress the images.
Me: *reads GTMetrix report* we would only have a 150kb improvement. It won't even be noticeable.
Manager: If the images take a long time to load, it means that they're too big, right?
Me: or the server is taking a long time to respond our request for them, which is the case.
Manager: compress the images and upload them.
Me: *compresses the images and uploads them* done.
Manager: I don't see any improvement.
Me: if only there was someone who could have predicted such an outcome...1 -
Request: I don't like the way the page looks. Make it better.
Question: can you give me some more info? What is it that you dislike about the page? You approved the design, the mockup, the HTML version...and we just finished implementing the backend. Can you be more specific?
Response: make it more like this *gives link to completly new layout from a theme on themeforest*. Why does mine not look like this. Make it like this!
Reaction: *fuck this shit, never freelancing again...* Well, then do it yourself. I'm done!
// best feeling ever :)3 -
“Fullstack dev continues to be consistent”
We’d an enhancement request where we needed to support Ionic apps. Our manager didn’t know anything about Ionic so she asks us what it was instead of asking Google.
Manager: so what’s this Ionic thingy?
Me: Ionic issss.... (gets interrupted by Fullstack dev)
Fullstack dev: so the thing is ... it’s like... (consistent with his opening lines as always) it’s a third party plugin which converts react app and html pages to native code.
Me: (thinking of sacrificing him at the altar of Lucifer)
Manager: Nice!
More to come.18 -
What the fuck has one of my clients been up to?! Every request he makes he suggests we might want to do it via a function.
"We need to ensure this is password protected. Maybe wrap the calls in a function."
I wander if he goes into the bakery and says, "I need a loaf of bread---use flour."
All I can think of is that someone influential in his life is an FP zealot and he's latched onto this word.
But, I quite like FP. Maybe I'll refactor everything to static classes to meet the requirement.
Hope to Christ he doesn't find out about HTML, etc. "Maybe add a CSS rule."8 -
Goes to first job interview. Great interview but, can you send some code?
-Sure-
Sends requested js, css html files.
Great code, we want to speak to you again!
Goes to second interview, waits 15m, meets the sales department. Sales? Wtf?
Great interview but, can you send more code?
Errr?
We need some native JS to really make sure you can write code.
You could've emailed this request before the interview b*tch. That way id save time hurrying in rain and traffic jams!4 -
So this story is from my University days. I was in the 6th semester back then, studying CS.
My University website was pretty shitty. Basically it was one of those old ass website that said "Best viewed in IE8". Anyway, I was snooping about the website, trying to find some news regarding an event.
I logged into my account, and randomly browsed into the leave request portal. This was a basic HTML form where students could apply for leaves from the classes and see the status of the leaves, if they have been granted or not. I noticed that the link to the request portal from the student login welcome page was actually something like http://univ.com/student/index.php/..., here 1234567 was my student ID. Yep, it was hardcore into the page, and sent as a GET request on being clicked. That was their idea of authentication I guess. I change the student ID to someone else's, and it let me login as that person.
Long story short, I wrote a little python script to login as every person from the starting of student IDs, till the end, then submit a leave request with a random dumb reason like "can't come, at the strip club" or "going for sex change operation". What I did not know was that when a request is submitted, a text message is also sent to the student's guardians phone number. I ran the script.
That day, over 1000 parents received text messages from the University saying that their kids have applied for a leave from random date to random date for some retarded reason. It was a blast. Students were talking about how someone had "Hacked" into the system.4 -
I was getting a freelancer job to do some backend work for a company in India that is working for a huge company in Saudi Arabia.
The customer in india was my primary contact, I wasn't allowed to talk to the guys in Saudi Arabia. My contact, we'll call him Aman, asks if i can do frontend too. I decline. Now what follows were 4 weeks of backend work during which Aman called me 10-15 times per day via skype to ask me how I was progressing, and if "insert spec here" was already done. He even called me in the middle of the night, well aware of the different time zones.
But in the end all the work is done, Aman is happy. I request payment.
Aman: We can't pay you yet, you didn't do the frontend!
Me: I'm not doing frontend.
Aman: It's just a few simple changes and then we're done.
Me: Gnnn, fuck it, what do you need?
Aman: Our customer would like the frontend to look better.
Me: Ok, so what exactly should look better?
Aman: All of it.
Me: Do you have any specs?
Aman: No just make it look more modern.
Me: So you want me to rework the whole frontend? That's not just a few simple changes...
Aman: How long would you need?
Me: I actually don't do that kind of work.
Aman: We pay you double your hourly rate if you do this and finish it fast.
(This is were I should have just said no... but the greed...)
Me: Ok, but it will take me about 3 weeks to do that.
Aman: OK.
Me: Do you have any preferences as to how it should look?
Aman: No, just surprise us.
(After this sentence I really should have gotten the hell out of Dodge)
After working 3 weeks changing over 20.000 lines of CSS and most of the HTML I present Aman with the changes.
Aman: No our customer doesn't like the changes. Can you make a different version?
Me: What doesn't he like, any specifics, coloring, styling of lists or the buttons?
Aman: He doesn't like the whole thing. Please make us another version.
Me: Ok, you are the customer, but it would really help if you give me some pointers as to how it should look like.
Aman: Just do your best.
Me: ..., ok, that's helpful.
2 weeks later...
Aman: No our customer liked the version before better. But could you make it look more modern.
Me: *Bangs head against wall repeatedly*
Me: What do you mean by modern?
Aman: It should look more modern, as a whole.
Me: Ok, I get that, but could you give me an example?
Aman: Sends me a screenshot of the overview screen with all the elements encircled and modern written beside them.
1 week later...
Aman: The customer has decided, he likes the original version best. Can you undo all the changes?
Me: Sure but that'll take like 1 hour.
Aman: Oh by the way we were asked by accounting why the price for this project was so high?
Me: *hugh* *gnn* what?
Aman: Well at the beginning, you estimated the backend and frontend work to be done in 4 weeks.
Me: The frontend was never part of the original estimate.
Aman: Can you do anything concerning your hourly rate, so that we can get back to the original pricing.
Me: *make a mental note to never work with an intermediary company in india again and cancels the job requesting the due payment*
Luckily I got paid the full amount but not before having another 10 Skype call with Aman...17 -
So, after weeks of reading spicy rants from all of you, I finally decided to join your community ; even if I'm only a student, I've encountered some solid crap in my internships.
Let's go back in time bois. Two years ago, I started my first intership at a Fortune 500 company (this doesn't exists in France, but whatever, this is nearly the same category). I was supposed to build some file sharing system for the office. Before getting into it, I briefly thought aboyt what technos I could use to build it and make a sweet interface for my co-workers, in 10 weeks, and not a single another day.
Expectations
> Nice team with devs that I could ask things about and learn solid tricks that would even amaze David Copperfield
> Having a nice dev environment
Reality
> Alone on this project
> No fucking dev environment, I had to build everything on Notepad
> No CI
> No SCM
> And, the worst, Ladies and Gentlemans,
I FUCKING HAD TO WORK IN A SINGLE FILE IN A CLOSED ENVIRONMENT.
NO WEBSERVER, NO DEDICATED SPACE.
I HAD TO REQUEST A SPECIFIC ENVIRONMENT IN A CLOSED CUSTOM CMS THAT WAS SERVING FILES, SO THIS FORMAT COULD BE READ ON FOLDER OPENING IN IE9 (FIREFOX FORBIDDEN).
YOU HAD TO MIX HTML, CSS AND JS IN A SINGLE FILE. NO SERVER-SIDE LANGUAGES, ONLY STATIC LINKS, NO FRAMEWORKS (if we can call jQuery, Bootstrap, Semantic UI and all these thinks "Frameworks").
> mfw at the end of the intership13 -
Dumbest request?
Email piping chat system.
The chat system had to take replies from web and send them to an email, which the admin user can reply back via email and it publishes straight into the chat.
It was all fun and games until they wanted HTML based emails and content going back and forth, and attachments going both ways.4 -
I was pressued to shift the blame.
We received an angry email from a customer that some of their data had disappeared. The boss assigns me to this task. This feature is relatively new and we've found some bugs in the past in here. I go through request logs, search the database, run some diagnostics, etc. for about 5 hours and I cannot find the problem. I focus on the bugs that we've had before but they don't seem to be the problem.
I tell the boss "sorry but I checked XYZ and I can't find the problem. I'm out of ideas." But the boss wanted answers by the end of the day. They did not want to admit to the client that we couldn't figure out what's wrong.
By now I was more pressured to find an answer, find something or someone to blame it on, not exactly to find the real solution. So I made up some BS:
"Sometimes, in HTML forms, the number inputs allow you to change the number by scrolling. We have some long forms where the user has to scroll. Perhaps the focus remained on the number input, so when they scrolled down they accidentally changed the number they meant to input."
The boss was happy with that. We explained this to the customer, and there's now a ticket to change type="number" to type="text" in our HTML forms and to validate it in th backend.
A week later another customer shows us a different error. This one is more clear because it had a stack trace, but I realise that this error is what caused our last error. It was pretty obscure, mind you, the unit tests didn't detect it.
I didn't tell the boss that they were connected tho.
With two angry clients in two weeks, I finally convinced the boss to give us more time to write more unit tests with full coverage. -
I miss the good times when the web was lightweight and efficient.
I miss the times when essential website content was immediately delivered as HTML through the first HTTP request.
I miss the times when I could open a twitter URL and have the tweet text appear on screen in two seconds rather than a useless splash screen followed by some loading spinners.
I miss the times when I could open a YouTube watch page and see the title and description on screen in two seconds rather than in ten.
I miss the times when YouTube comments were readily loaded rather than only starting to load when I scroll down.
JavaScript was lightweight and used for its intended purpose, to enhance the experience by loading content at the page bottom and by allowing interaction such as posting comments without having to reload the entire page, for example.
Now pretty much all popular websites are bloated with heavy JavaScript. Your browser needs to walk through millions of bytes of JavaScript code just to show a tweet worth 200 bytes of text.
The watch page of YouTube (known as "polymer", used since 2017) loads more than eight megabytes of JavaScript last time I checked. In 2012, it was one to two hundred kilobytes of HTML and at most a few hundred kilobytes of JavaScript, mostly for the HTML5 player.
And if one little error dares to occur on a JavaScript-based page, you get a blank page of nothingness.
Sure, computers are more powerful than they used to be. But that does not mean we should deliberately make our new software and website slower and more bloated.
"Wirth's law is an adage on computer performance which states that software is getting slower more rapidly than hardware is becoming faster."
Source: https://en.wikipedia.org/wiki/...
A presentation by Jake Archibald from 2015, but more valid than ever: https://youtube.com/watch/...34 -
Friend of mine created a blog from scratch... You could create a post, by just sending a POST request (no authentication required!)....
As an additional bonus: you could dump full unfiltered HTML in a post, which was then executed...
Please kill me5 -
Story time
I really love helping and teaching others about code. Recently I had a friend that wanted to get into web development. Being me, I told him that i would teach him all he wants but that he needs to do some research first to show me that he feels comfortable with as a minimum requirement. I told him to research the minimum technologies required to build a web page and to tell me about the request response cycle and stuff like that. When he came back I was expecting small explanations such as "html stands for bla bla and is used for bla bla".No. this dude comes back all proud to tell me about flipping Laravel. I sit there quietly listening to him go on about the "Laravel programming language". He likes anime, I like kendo (and have trained in it) so while he is talking I slowly move us into the part of my office where I keep my boken (wodden sword). As soon as he sees me sitting down with the sword he asks what am i doing with it.
"Well, remember when in some anime that you like you see teachers beating their studets over stupid shit?"
"What?"
..."WHAT DOES HTTP STANDS FOR?"
"The...the err the web language that.. er"
BOINK
"what is javascript?"
"Like the updates thing?"
HARDER BOINK
:) guarantee he wont forget what http is after that and what js and Laravel are from now on :) needless to say he will continue learning with much more care.
Coding dojo for real mofockas, ya dig?3 -
The people who wrote the specs for SAP OCI should be hanged by rusty barbed wire while being tickled by krusty the clown.
Which one of these stinky hobbits thought it was a great idea to require a (catalog) server to handle a POST request by sending back an HTML form which has to execute a POST request immediately by JavaScript on load?
Why not fucking respond with the actual god damn fucking data?
Some "senior" (read "senile") software "engineer" has to get decapitated.
Quote from the specification (OCI Function: VALIDATE, section 2.3.2):
"The product catalog replies with an HTML page that contains a form with the productdata in OCI format. [...] The HTML page may not contain any visible elements ([...]). The form must be sent automatically by JavaScript after the page has been loaded."
The only thing that should get sent after loading would be these people's asses to hell after my minigun has finished loading.
SAP is the kind of company who earns a huge junk of money from utter, stinking, filthy crap and they like to piss in their customers' "müesli".4 -
Boss: we can't accept your MR request until you fix the problems we highlighted, everything is blocked and the client is getting angry
My brother in Christ, I understand your concerns but I need you to understand: you decided to block a perfectly working and documented PR because you didn't like having "<!-- -->" in a couple of HTML files and menial bullshit like that.
It may not be the most elegant thing ever but don't put on me the responsibility of your blocks or I'll smash your face with the coffee mugs I've used to work until midnight so that you could deliver the product in time after someone else delayed the deadline twice already.
Thanks and get fucked ASAP.3 -
Gave the marketing team access to JIRA and gave them permissions to create tickets. Don’t know if that was a management’s design or what. Tickets were poorly written and I had to make frequent follow ups to figure out what the heck was actually being requested. I did get accused of “questioning the request” at least once. It was a big WTF because I think marketing thought they managed dev team but they didn’t.
Marketing also didn’t give a damn about agile processes despite being told some simple rules, such as don’t change your ticket details after a dev has already begun work on it. I would pick up a ticket thinking it’s just html and css updates, then it would change to include an api update. No no no. You’ve just turned a 1 day ticket into a 1 week ticket. I don’t have time for these shenanigans.
I would also submit tickets for code review and marketing would say it’s not ready for review. Then why was that ticket in the to do column for the past two days?! They couldn’t make a decision and would submit revisions every single day.
And they would think devs could do everything. No, never assume the front end dev can pick up back end tasks.
No one on dev team really cared because we were all looking for new jobs anyway. The company was planning to lay us off in a year. Every month a dev gave notice and left.3 -
This was actually written by a Junior of mine (and if it wasn't for me having to review it, it would have made it to production):
- Admi password was just an MD5 in the javascript.
- Javascript would validate the password input.
- Javascript would then send a POST request to a PHP script.
- On display, the HTML of the news article wasn't HTML escaped.
My brain: "Let's just send this XSS vector to this PHP script"4 -
"Can you review this pull request?"
Ok, sure
- Description in broken English
- HTML/CSS changes seemingly just for the fuck of it
- No user story listed OR
- User story listed has no description
- Mockup does not specify what should be changed
- Owner is offline because this entire team operates out of India
- Requirements said to exist but their location is unknown8 -
Holy shit firefox, 3 retarded problems in the last 24h and I haven't fixed any of them.
My project: an infinite scrolling website that loads data from an external API (CORS hehe). All Chromium browsers of course work perfectly fine. But firefox wants to be special...
(tested on 2 different devices)
(Terminology: CORS: a request to a resource that isn't on the current websites domain, like any external API)
1.
For the infinite scrolling to work new html elements have to be silently appended to the end of the page and removed from the beginning. Which works great in all browsers. BUT IF YOU HAPPEN TO BE SCROLLING DURING THE APPENDING & REMOVING FIREFOX TELEPORTS YOU RANDOMLY TO THE END OR START OF PAGE!
Guess I'll just debug it and see what's happening step by step. Oh how wrong I was. First, the problem can't be reproduced when debugging FUCK! But I notice something else very disturbing...
2.
The Inspector view (hierarchical display of all html elements on the page) ISN'T SHOWING THE TRUE STATE OF THE DOM! ELEMENTS THAT HAVE JUST BEEN ADDED AREN'T SHOWING UP AND ELEMENT THAT WERE JUST REMOVED ARE STILL VISIBLE! WTF????? You have to do some black magic fuckery just to get firefox to update the list of DOM elements. HOW AM I SUPPOSED TO DEBUG MY WEBSITE ON FIREFOX IF IT'S SHOWING ME PLAIN WRONG DATA???!!!!
3.
During all of this I just randomly decided to open my website in private (incognito) mode in firefox. Huh what's that? Why isn't anything loading and error are thrown left and right? Let's just look at the console. AND IT'S A FUCKING CORS ERROR! FUCK ME! Also a small warning says some URLs have been "blocked because content blocking is enabled." Content Blocking? What is that? Well it appears to be a supper special supper privacy mode by firefox (turned on automatically in private mode), THAT BLOCKS ALL CORS REQUESTS, THAT MAY OR MAY NOT DO SOME TRACKING. AN API THAT 100% CORS COMPLIANT CAN'T BE USED IN FIREFOXs PRIVATE MODE! HOW IS THE END USER SUPPOSED TO KNOW THAT??? AND OF COURSE THE THROWN EXCEPTION JUST SAYS "NETWORK ERROR". HOW AM I SUPPOSED TO TELL THE USER THAT FIREFOX HAS A FEAUTRE THAT BREAKS THE VERY BASIS OF MY WEBSITE???
WHY CAN'T YOU JUST BE NORMAL FIREFOX??????????????????
I actually managed to come up with fix for 1. that works like < 50% of the time -_-5 -
8 years ago,
I studied in a small school and every year we had computer classes, but most of the times, it gets cancelled or we just sit and browse and sometimes few of us don't even get a computer.
In that time, the only reason I was attached with the computer was due to games.
Our curriculum mentioned HTML, CSS, Access and Excel, which none of the teachers taught us for past 2 years. I wanted to learn all does, but gave up since no one cared about it.(please note that time, I didn't know even to use YouTube or W3schools to learn stuffs)
Then, a new student joined in our class and also a new computer ma'am joined our school. Both of them turned out to be really fun when it comes to learning computers.
She was active during last sessions and teach us HTML, CSS. I even started writing blogs which she taught. The most surprising part was she was super frank. She went beyond her duty, and taught me what Facebook is, how to use it, and opened an account for me which I am still using it, and she sent a friend request to herself. (In lab, past teachers would shout to students trying to open fb. All of them were super strict.)
She was kind and friendly, and during theory classes, the new student in our class would answer every single question. Then, somehow we both started sharing sits in computer class, and he will tell me answers and we both raise hands to answer the question. My teacher will also keep asking interesting questions which made me more inclined to computer science.
My story isn't related to learning a programming language or an algorithm, but it was the wave that brought me closer towards CS and after 2 years, I joined CS in University and till now, haven't look back and always thanked both of them, my respected ma'am and my dear friend, who inspired me and brought out my curiosity towards computers.
Note: My friend is doing Medical currently and when I teased him that I did CS and now, I know more than you and this time, I am gonna whisper in your ears if someone asks any question, to which he replied, I accept I am doing Medical, but I still love computers and know a hell lot about it.
My teacher got married and she also got a cute baby. We talk occasionally in fb and she is going great too.
I hope to meet both of them someday soon. -
When you do some researchs on the net, you may not find all the answers, but there are definitely a lot of questions..
-
just found out a vulnerability in the website of the 3rd best high school in my country.
TL;DR: they had burried in some folders a c99 shell.
i am a begginer html/sql/php guy and really was looking into learning a bit here and there about them because i really like problem solving and found out ctfs mainly focus on this part of programming. i am a c++ programmer which does school contest like programming problems and i really enjoy them.
now back on topic.
with this urge to learn more web programming i said to myself what other method to learn better than real life sites! so i did just that. i first checked my school site. right click. inspect element. it seemed the site was made with wordpress. after looking more into the html code for the site i concluded all the images and files i could see on the site were from a folder on the server named 'wp-content/uploads'. i checked the folder. and here it got interesting. i did a get request on the site. saw the details. then i checked the site. bingo! there are 3 folders named '2017', '2018', '2019'. i said to myself: 'i am god.'
i could literally see all the announcements they have made from 2017-2019. and they were organised by month!!! my curiosity to see everything got me to the final destination.
with this adrenaline i thought about another site. in my city i have the 3rd most acclaimed high school in the country. what about checking their security?
so i typed the web address. looked around. again, right click, inspect element and looked around the source code. this time i was more lucky. this site is handmade!!! i was soooo happy because with my school's site i was restricted with what they have made with wordpress and i don't have much experience with it.
amd so i began looking what request the site made for the logos and other links. it seemed all the other links on the site were with this format: www.site.com/index.php?home. and i was very confused and still am. is this referencing some part of the site in the index.php file? is the whole site written inside the index.php file and with the question mark you just get to a part of the site? i don't really get it.
so nothing interesting inside the networking tab, just some stylesheets for the site's design i guess. i switched to the debugger tab and holy moly!! yes, it had that tree structure. very familiar. just like a project inside codeblocks or something familiar with it. and then it clicked me. there was the index.php file! and there was another folder from which i've seen nothing from the network tab. i finally got a lead!! i returned in the network tab, did a request to see the spgm folder and boooom a site appeared and i saw some files and folders from 2016. there was a spgm.js file and a spgm.php file. there was a contrib, flavors, gal and lang folders. then it once again clicked me! the lang folder was las updated this year in february. so i checked the folder and there were some files named lang with the extension named after their language and these files were last updated in 2016 so i left them alone. but there was this little snitch, this little 650K file named after the name of the school's site with the extension '.php' aaaaand it was last modified this year!!!! i was so excited! i thought i found a secret and different design of the site or something completely else! i clicked it and at first i was scared there was this black/red theme going on my screen and something was a little odd. there were no school announcements or event, nononoooo. this was still a tree structured view. at the top of the site it's written '!c99Shell v. 1.0...'
this was a big nono. i saw i could acces all kinds of folders. then i switched to the normal school website and tried to access a folder i have seen named userfiles and got a 403 forbidden error. wopsie. i then switched to the c99 shell website and tried to access the userfiles folder and my boy showed all of its contents. it was nakeeed naked. like very naked. and in the userfiles folder there were all, but i mean ALL files and folders they have on the server. there were a file with the salary of each job available in the school. some announcements. there was a list with all the students which failed classes. there were folders for contests they held. it was an absolute mess and i couldn't believe it.
i stopped and looked at the monitor. what have i done? just to learn some web programming i just leaked the server of the 3rd most famous high school in my country. image a black hat which would have seriously caused more damage. currently i am writing an email to the school to updrage their security because it is reaaaaly bad.
and the journy didn't end here. i 'hacked' the site 2 days ago and just now i thought about writing an email to the school. after i found i could access the WHOLE server i searched for the real attacker so if you want to knkw how this one went let me know in the comments.
sorry for the long post, but couldn't held it anymore13 -
I'm considering quitting a job I started a few weeks ago. I'll probably try to find other work first I suppose.
I'm UK based and this is the 6th programming/DevOps role I've had and I've never seen a team that is so utterly opposed to change. This is the largest company I've worked for in a full time capacity so someone please tell me if I'm going to see the same things at other companies of similar sizes (1000 employees). Or even tell me if I'm just being too opinionated and that I simply have different priorities than others I'm working with. The only upside so far is that at least 90% of the people I've been speaking to are very friendly and aren't outwardly toxic.
My first week, I explained during the daily stand up how I had been updating the readmes of a couple of code bases as I set them up locally, updated docker files to fix a few issues, made missing env files, and I didn't mention that I had also started a soon to be very long list of major problems in the code bases. 30 minutes later I get a call from the team lead saying he'd had complaints from another dev about the changes I'd spoke about making to their work. I was told to stash my changes for a few weeks at least and not to bother committing them.
Since then I've found out that even if I had wanted to, I wouldn't have been allowed to merge in my changes. Sprints are 2 weeks long, and are planned several sprints ahead. Trying to get any tickets planned in so far has been a brick wall, and it's clear management only cares about features.
Weirdly enough but not unsurprisingly I've heard loads of complaints about the slow turn around of the dev team to get out anything, be it bug fixes or features. It's weird because when I pointed out that there's currently no centralised logging or an error management platform like bugsnag, there was zero interest. I wrote a 4 page report on the benefits and how it would help the dev team to get away from fire fighting and these hidden issues they keep running into. But I was told that it would have to be planned for next year's work, as this year everything is already planned and there's no space in the budget for the roughly $20 a month a standard bugsnag plan would take.
The reason I even had time to write up such a report is because I get given work that takes 30 minutes and I'm seemingly expected to take several days to do it. I tried asking for more work at the start but I could tell the lead was busy and was frankly just annoyed that he was having to find me work within the narrow confines of what's planned for the sprint.
So I tried to keep busy with a load of code reviews and writing reports on road mapping out how we could improve various things. It's still not much to do though. And hey when I brought up actually implementing psr12 coding standards, there currently aren't any standards and the code bases even use a mix of spaces and tab indentation in the same file, I seemingly got a positive impression at the only senior developer meeting I've been to so far. However when I wrote up a confluence doc on setting up psr12 code sniffing in the various IDEs everyone uses, and mentioned it in a daily stand up, I once again got kickback and a talking to.
It's pretty clear that they'd like me to sit down, do my assigned work, and otherwise try to look busy. While continuing with their terrible practices.
After today I think I'll have to stop trying to do code reviews too as it's clear they don't actually want code to be reviewed. A junior dev who only started writing code last year had written probably the single worst pull request I've ever seen. However it's still a perfectly reasonable thing, they're junior and that's what code reviews are for. So I went through file by file and gently suggested a cleaner or safer way to achieve things, or in a couple of the worst cases I suggested that they bring up a refactor ticket to be made as the code base was trapping them in shocking practices. I'm talking html in strings being concatenated in a class. Database migrations that use hard coded IDs from production data. Database queries that again quote arbitrary production IDs. A mix of tabs and spaces in the same file. Indentation being way off. Etc, the list goes on.
Well of course I get massive kickback from that too, not just from the team lead who they complained to but the junior was incredibly rude and basically told me to shut up because this was how it was done in this code base. For the last 2 days it's been a bit of a back and forth of me at least trying to get the guy to fix the formatting issues, and my lead has messaged me multiple times asking if it can go through code review to QA yet. I don't know why they even bother with code reviews at this point.18 -
I am a Technical Lead in the department in my company that writes code for our clients that have money but doesn't have the technical expertise to handle the complexities of our own software.
Part of my tasks involve taking care of a few projects written by employees that have left after using third-party tools rather than using our own software. No one else in this department knows these third-party tools, they only know our own, and my *still limited* web development experience means I get dumped these things in my lap.
And I'm SO pissed at these projects and their authors and the manager that let these ex-employees write these things. There is this one project that was managed by two different "developers" (I don't know they deserve this title) at two different times, and it is so riddled with different technologies it makes me want to throw up almost daily.
Don't believe me? Here is a complete list of the dependencies listed in the package.json of this project: babel-polyfill, body-parser, cookie-parser, debug, edge, edge-sql, excel-to-json, exceljs, express, html-inline, jade, morgan, mssql, mysql, pug, ramda, request, rotating-file-stream, serve-favicon, webpack, xlsx, xml2js
What this doesn't even show, is that one part of this project (literally one page) is made using react, react-dom, react-redux, and jade. The other part (again literally one page) is made using Angular and Pug. In case you missed it while picking up your jaw, there's also mssql, mysql, edge and edge-sql. excel-to-json, exceljs, xlsx.
Oh you want *more* juicy details? This project takes the entire data object used by the front-end, stringifies it into JSON, and shoves it into the database *as a single field*. And instead of doing WHERE clauses in the SQL queries, it grabs the entire table, loops, parses the json, and does a condition on it. If even one of those JSON entries gets corrupted, the entire solution breaks because these "developers" don't know what try/catch is.
The client asked for a very simple change in their app, which was to add a button that queries the back-end for a URL, shows it in a modal dialog, after which a button is clicked to verify the link by doing a second query to the back-end before modifying a couple of fields in the page.
This. Took. Me. Two. Months*. Save me. Please, save me.
*between constant context switches between this and other projects that were continuously failing because of their mistakes.4 -
It's been a while DevRant!
Straight back into it with a rant that no doubt many of us have experienced.
I've been in my current job for a year and a half & accepted the role on lower pay than I normally would as it's in my home town, and jobs in development are scarce.
My background is in Full Stack Development & have a wealth of AWS experience, secure SaaS stacks etc.
My current role is a PHP Systems Developer, a step down from a senior role I was in, but a much bigger company, closer to home, with seemingly a lot more career progression.
My job role/descriptions states the following as desired:
PHP, T-SQL, MySQL, HTML, CSS, JavaScript, Jquery, XML
I am also well versed in various JS frameworks, PHP Frameworks, JAVA, C# as well as other things such as:
Xamarin, Unity3D, Vue, React, Ionic, S3, Cognito, ECS, EBS, EC2, RDS, DynamoDB etc etc.
A couple of months in, I took on all of the external web sites/apps, which historically sit with our Marketing department.
This was all over the place, and I brought it into some sort of control. The previous marketing developer hadn't left and AWS access key, so our GitLabs instance was buggered... that's one example of many many many that I had to work out and piece together, above and beyond my job role.
Done with a smile.
Did a handover to the new Marketing Dev, who still avoid certain work, meaning it gets put onto me. I have had a many a conversation with my line manager about how this is above and beyond what I was hired for and he agrees.
For the last 9 months, I have been working on a JAVA application with ML on the back end, completely separate from what the colleagues in my team do daily (tickets, reports, BI, MI etc.) and in a multi-threaded languages doing much more complicated work.
This is a prototype, been in development for 2 years before I go my hands on it. I needed to redo the entire UI, as well as add in soo many new features it was untrue (in 2 years there was no proper requirements gathering).
I was tasked initially with optimising the original code which utilised a single model & controller :o then after the first discussion with the product owner, it was clear they wanted a lot more features adding in, and that no requirement gathering had every been done effectively.
Throughout the last 9 month, arbitrary deadlines have been set, and I have pulled out all the stops, often doing work in my own time without compensation to meet deadlines set by our director (who is under the C-Suite, CEO, CTO etc.)
During this time, it became apparent that they want to take this product to market, and make it as a SaaS solution, so, given my experience, I was excited for this, and have developed quite a robust but high level view of the infrastructure we need, the Lambda / serverless functions/services we would want to set up, how we would use an API gateway and Cognito with custom claims etc etc etc.
Tomorrow, I go to London to speak with a major cloud company (one of the big ones) to discuss potential approaches & ways to stream the data we require etc.
I love this type of work, however, it is 100% so far above my current job role, and the current level (junior/mid level PHP dev at best) of pay we are given is no where near suitable for what I am doing, and have been doing for all this time, proven, consistent work.
Every conversation I have had with my line manager he tells me how I'm his best employee and how he doesn't want to lose me, and how I am worth the pay rise, (carrot dangling maybe?).
Generally I do believe him, as I too have lived in the culture of this company and there is ALOT of technical debt. Especially so with our Director who has no technical background at all.
Appraisal/review time comes around, I put in a request for a pay rise, along with market rates, lots of details, rates sources from multiple places.
As well that, I also had a job offer, and I rejected it despite it being on a lot more money for the same role as my job description (I rejected due to certain things that didn't sit well with me during the interview).
I used this in my review, and stated I had already rejected it as this is where I want to be, but wanted to use this offer as part of my research for market rates for the role I am employed to do, not the one I am doing.
My pay rise, which was only a small one really (5k, we bring in millions) to bring me in line with what is more suitable for my skills in the job I was employed to do alone.
This was rejected due to a period of sickness, despite, having made up ALL that time without compensation as mentioned.
I'm now unsure what to do, as this was rejected by my director, after my line manager agreed it, before it got to the COO etc.
Even though he sits behind me, sees all the work I put in, creates the arbitrary deadlines that I do work without compensation for, because I was sick, I'm not allowed a pay rise (doctors notes etc supplied).
What would you do in this situation?4 -
Our new project is a responsive mobile-first web system coded with HTML, CSS, jQuery and AJAX that connects to MySQL, but the main tasks runs trough a huge application written in Visual FoxPro, per client request...the web version could manage the whole business but no, it has to be Fox.
Oh, and it's the version 6, not even using the latest version 9 with all it's "improvements". What are we, back to the past milleniun?3 -
I'm currently between jobs and have a few rants about my previous job (naturally). In retrospect, it's somewhat therapeutic to range about the sheer brainfuckery that has taken place. Enjoy!
First, let me set the scene: legacy B2B web app made with LEMP stack and sencha ext.js 3 + 4 (don't ask) and a lot of madness. Let's call that app "Alpha".
Alpha is a self made CMS build for typical ERP stuff. Yes, a self made CMS: entities are containers, containers have types and fields and values. Like so many legacy PHP apps, it does not have a dedicated FE: the HTML is rendered on the server and then spewed out to the browser.
Easy right? Coding like it's 1999! But there was a twist: Because everything is basically a container, the HTML-templates are saved in the DB. Along with the nessary JS and the CSS. And the translation variables. Why? Because fuck you! That's why. Who needs a git history anyways.
For some reason, Alpha was kinda slow.
There was also an editor, that allowed you to modify templates (web, mail, pdf) on the fly in prod. Because templates contain repeating data (header/footer), one template could contain additional templates. Much confusion. You could change templates via migration (slow, boring) or just ctrl-c/ctrl-v that sucker (fast, much excitement).
Did I mention Alpha was slow?
On with the rant: e-mails! How do they work? Noone knows. How to send mails asynchronous in PHP? Witchcraft is the only possible answer to that riddle. Here is your enterprise™ solution:
1. create mail
2. insert mail into DB
3. WAIT UP TO 59 SECONDS FOR A FUCKING CRON TO SEND MAIL
Why? "Because that way, we can resend mails in case the network is down :)"
Same procedure for the SOAP-API (db-queue + cron). You read that right: all requests to various other systems are processed once a minute.
Alpha slow.
Alpha was only one of several systems. Imagine a bunch of monolithic php apps, interconnected via SOAP, REST and GraphQL like a godamn intergalactic orgy. Image having to debug that cluster fuck.
Let's say there is a bad request. These things happen. No biggie. Remember the db-queue? Let's try to send the bad request a second time! And a third time! Still no luck? How odd. Let's create a specific file in a specific directory: a LOCK-file. Now, "the db-queue is on hold and no request gets processed :)"
Golly gee thanks Alpha.
Anyhow, did you know that MySQL has a join limit of 61 tables?3 -
So I go into Google Search Console to try to determine why its saying pages are not compliant with mobile and whatnot.
3 hours later I come out realizing that what Google REALLY wants is for everyone to build every web page as static HTML with no script tags and never a call to an external website. Just dump all that javascript and css and HTML into one BIG FRIGGIN FILE so our crawler feels satisfied that it's loading everything all in one request.
No CMSes allowed unless GOOGLE built it.
Let's just all revert to HTML 1.0 and be done with it.1 -
We've recently employed a new lead dev that seems to have a problem in that his solution is always the correct solution.
On a typical day, whenever I push code up for review via pull request, every single ticket I work on, he has something that has to change which doubles the amount of time of each ticket.
I'd be fine with this if the other 2 developers also think he's a bit of a headache in terms of his opinion but a lot of the time, there is always.. ALWAYS something that has to change because his method is better than mine.
For example, just now I pushed up some code that literally just adds in the user's email to the view which is already in the store for that action/effect anyway. I added one line of HTML.
He comments saying that I need to change the way it gets the email by doing a different request in the effect, to get the current user id, and from that match it against the email address, and THEN display it in the view.
This ticket took me 5 minutes. He's making me make it 30-60 minutes (to understand his requirement and implement it).
Is this normal? Am I over reacting?
Opinions please!7 -
I would like to present new super API which I have "pleasure" to work with. Documentation (very poor written in *.docx without list of contents) says that communication is json <-> json which is not entirely true. I have to post request as x-www-form with one field which contains data encoded as json.
Response is json but they set Content-Type header as text/html and Postman didn't prettify body by default...
I'm attaching screenshot as a evidence.
I can't understand why people don't use frameworks and making other lives harder :-/3 -
So... our software is... really old. Part of it was built 20 years ago in Delphi 6 and is still used to this day. It's an automation tool, which supports some scripting... In WSH. Meaning, it only supports JScript (that's right, not javascript, just JScript, the 1998 version), VBScript, and through the use of activex, Python or Perl.
And even our *newer* software, built a couple years ago, just released an update where the HTML rendering engine was updated... to Gecko 38, the version from 3 years ago. And the JavaScript engine is Rhino, the "old" one now replaced by Nashorn a few years back, and barely updated since.
But... there is *some* light on the horizon. The very newest automation tool now has a new plugin, which is based in NodeJS. Having just installed this newer version, I looked in the files to find the nodejs.exe executable... to find that it's on version 8.9.4. Ok it's not precisely the "latest" version, but knowing the history of development for these things I almost expected node 0.10.
It's great news in all this ancient technology I have to deal with. When's the *last* time you made an HTTP request using this code?
var http = new ActiveXObject("WinHttp.WinHttpRequest.5.1");
http.open('GET', 'http://example.com/', false);2 -
I'm working as an intern in a company and i have another intern that i must supervise (it like internception) .here is my daily nightmare :
- To start this intern never google something she copy paste from my code and if she got an error she send me a screenshot . Once the error message clearly said "cannot call function from array" and even that she didn't know what's the problem (she was supposed to it on array items)
-Before we started working together she spent a week complaining that a sending email function didn't work for her so the manager called me to check what's her problem. She had an antivirus that blocked request via ssl port.all i had done is open the log file and read the errors.
- She had a function should iterate over an array and for each item check a condition this is a part of what she wrote :
For ($i=0;count($categories);$i++){
if ($getrelativepath=null)
{
....etc other stuff she copy pasted.
Ps: the name of the function that she must call on array items is getRelativePath
- she wrote once
$response=array();
for (...){
array_push($response,$data[$i]);
return $response;}
She thought the function can iterate and return response at the same time.
- we are working on a website and she told me she doesn't know how to code Javascript and jquery (she think it's a language) and she never knew what ajax is.
- without mentioning the hundreds of empty spaces and multiple empty divs in html .
This year she'll become a computer science engineer .6 -
Me: [jira comment] We have similar text for the mobile version of the site already. [includes screenshot of what site looks like now] Are you sure about this?
[radio silence for a few hours]
Me: [slack] I want to follow up.
Web Operations: What’s the issue?
Ooh k. Slack messages can have a tone.
Me: I just want to confirm we’re not repeating copy.
Web Ops: We’re not.
I complete the ticket and submit for review. The C-suite for my department reviews.
C-suite: [to web ops in JIRA comment] This looks weird. Is this right? [sends screenshot of my work because there is repeated copy, like I said there’d be]
Web Ops: [in JIRA comment] Oh, I thought X was questioning the request. X changed the wrong text.
C-suite: The website has always looked like that. You’re looking at X’s screenshot for the current website. Look at the screenshot I sent over.
Later, I complain because web ops was completely unprofessional with the comment about “questioning the request.”
C-suite: Web Ops is working hard. It’s our busy season and it’s their first time dealing with it. You know, I’m going to teach them some css and html so they can make content changes in the CMS and they’re not sending over changes so often and bothering you.
Me: [to myself] 🤨 wtf so it’s ok for web ops to treat me like dirt. And in writing. And with service that’s version controlled—JIRA emailed web ops comment to me. And lol no 😂 on teaching them how to code. That’s such bullshit. We all know you’d never allow them to edit the CMS because they’d fuck up the site. And they wouldn’t do edits anyway because it’s beneath them. And idk how this relates to web ops gross behavior.
A few days later.
Me: I was offered a job elsewhere. Here’s my two weeks notice.
C-suite: Can you push back your last day? It’s our busy season.
Me: Nope. Bye Felicia.1 -
hey, y'all android users listen up. i wanna start a new project but im not sure if it's gonna be useful. essentially, i want to make a scripting language to program people's phone, so devs or android super users can make the most of their phone. users will be able to create, share, and schedule execution of the scripts all from the app. is it a good idea? is their something like it?
example of a use i personally would have: there is a set date for when the soccer league schedule for the youth league i play in is supposed to be released online. however, the set date is never met, and it is usually a few days late. in this case, i could make a script to request to the website with the schedule and see if the html changed from last time, and if so it would send me a notif saying "check for schedule" or something similar.
then, i could schedule it to run every five minutes, and i wouldnt have to check manually.
its essentially bash automation for your phone.
good idea?8 -
Sharing a first look at a prototype Web Components library I am working on for "fun"
TL;DR left side is pivot (grouped) table, right side is declarative code for it (Everything except the custom formatting is done declaratively, but has the option to be imperative as well).
====
TL;DR (Too long, did read):
I'm challenging myself to be creative with the cool new things that browsers offer us. Lani so far has a focus on extreme extensibility, abstraction from dependencies, and optional declarative style.
It's also going to be a micro CSS framework, but that's taking the back-seat.
I wanted to highlight my design here with this table, and the code that is written to produce this result.
First, you can see that the <lani-table> element is reading template, data, and layout information from its child elements. Besides the custom highlighting code (Yellow background in the "Tags" column, and green gradient in the "Score" column), everything can be done without opening even a single script tag.
The <lani-data-source> element is rather special. It's an abstraction of any data source, and you, as a developer can add custom data sources and hook up the handlers to your whim (the element itself uses the "type" attribute to choose a handler. In this case, the handler is "download" which simply sends a fetch request to the server once and downloads the result to memory).
Templates are stored in an html file, not string literals (Which I think really fucks the code) and loaded async, then cached into an object (so that the network tab doesn't get crowded, even if we can count on the HTTP cache). This also has the benefit of allowing me to parse the HTML templates once and then caching the parsed result in memory, so templates are never re-parsed from string no matter how many custom elements are created.
Everything is "compiled" into a single, minified .js file that you include on your page.
I know it's nothing extraordinary, but for something that doesn't need to be compiled, transpiled, packaged, shipped, and kissed goodnight, I think it's a really nice design and I hope to continue work on it and improve it over time1 -
I need help!
This is gonna be a long question/story.
I'm a Syrian based in Malaysia working as a lead web dev in a good company.
I have a friend in trouble and I want to help him.
Here's a summary:
My friend is a project manager at a gaming studio he happens to be an Iranian atheist with around 2 years of experience in the game making industry.
He worked on and delivered a couple AAA games at his current place of employment as a project manager in one of the teams that made those games.
He stood up for his team when the management was overworking team till after midnight sometimes and forcing them to work on weekends without any tangible compensations ( basically they gave them things like free lunches, movie tickets, etc).
The result of his standing up to his team was the management handing him a notice telling him that he'll be fired within 2 months due to "underperforming".
This was a month and a half ago.
He looked around in Malaysia for a job that can get him a working visa, but his niche background couldn't help.
After his termination in few weeks he can extend his stay at Malaysia for approximately 2 - 3 months.
Now the reason why I mentioned that he's an "Iranian atheist" is the fun part of this story (sarcasm), Iranian government considers him as an "infidel" and he's banned from Iran.
His Iranian passport can't get him anywhere where he can make a living.
So basically he has close to no options.
Now to where I come into all of this:
I want to help him.
I'm going to dedicate my free time for the next 2 - 3 months teaching him web development, the problem is, I don't know how to teach web development in such a short time, in fact I've never taught anyone programming from scratch.
If he can show promising results I know that I can make a case for him get him a position in the company I work for.
I already convinced him today to try and learn web development because I can tell that in Malaysia there's always demand on good web developers.
Now to my request:
how can I best teach web development to someone with no programming background ? I'm thinking about teaching him front end development, so: HTML, CSS/SASS and JavaScript. maybe react js as well if possible ( high demand is usually on React/ Angular front end developers)
Did anyone here teach programming to someone else before?
Did anyone here learn web development in such a short time?
If you've read all this... Thank you :)17 -
GET Requests with a BODY as a payload are legit and stop living in denial!
TALKING TO YOU ANGULAR!
I'm fucking sick of seeing ignorant people(on SO or GitHub) coming up with the generic advice, on HTTP GET issues with having a BODY as a payload, to don't do that or you shouldn't, yadayadayada.
It's not a fucking issue at all in general, because as RFC-7231(https://tools.ietf.org/html/...) sais:
"A payload within a GET request message has no defined semantics; sending a payload body on a GET request might cause some existing implementations to reject the request."
So, if your fucking server can't handle them(aka living in the past), [rest] in peace and suck it up!
(ps, I happen to use modern servers)
But why should you limit a fucking front-end framework(ex. Angular) in the first plate to being able to send such requests?!
It's a moronic limitation and the person or team responsible for it are at least clueless and as far the issue has reappeared through time, for how old is Angular, they didn't move an inch.14 -
!Rant
Bug Report / Feature Request.
Just 2 things that bother me with the web app.
1. You can't modify rants or comments - only delete them.
2. On the profile page the web version does not replace line breaks "\n" with html breaks "<br>". (See the code on my profile on mobile vs web.
Just thought I'd mention them since I use the web app more than the mobile.5 -
Tutorial for a great Excel export function for your Webapp:
1. Search a Javascript enhanced html table control which supports exports to Excel
2. Use that Control and fill in every Request Data into it
3. Hide the entire Table except the Export Button -
I want your opinion about designing a web.
What is better for you?
1) A web page with 2 files (e.g. page1.html and page2.html), so the client must send a request for each content.
2) A web page with 1 file (e.g. page.html) with all the content in divs with 'display: none' and switch between them wth javascript.
Thanks!13 -
This team mate of mine always finds a way to escape my suggestions in his pull requests.
Today he told me that what I'm asking him is just my personal preference and that it's not a thing just because our formatter isn't powerful enough to do it automatically.3 -
jinja templates make me look towards html in a whole new light. are we 'inserting' data to an already rendered page? am i really mixing server code with ui ? It doesn't feel so. there are if else and loops being executed for html code, like wtf?
I don't know but everything feels so good. like i was literally hating every piece of website i was writing in php. everytime i wrote <div>....</div> followed by <?php ... ?> followed by another html tag /php tag in a fuckin php file, i wanted to kill someone from w3c.
WHY THE FUCK ARE WE ALLOWING THE MIXUP ?WHY IS PHP FILE HOLDING HTM TAGS? WHY?WHY?WHY?
But this... this is beauty. their is separation of concerns. jinja has some big powers, we can loop, repeat, make clauses, inherit other html classes, load html content into blocks, set variables,
but main concepts like file handling, response/request handling,calculations,etc are all being done in separate python files. I know that these jinja templates also might be running python in background, but atleast a developer cannot fuck up that code.
we can be sure that if correct jinja codes are written in html, then it would load correctly. And wherever devs doesn't fuck up, the output is better to understand and more maintainable/scaleable3 -
My way through front end started with a simple request of changing a blog CSS.. which I knew nothing of. Looking back it feels odd starting with CSS then HTML, JS and now first PHP; but oh well what ever works?
That was a couple of years ago and lately I've done couple of minor freelance projects and have helped students at my university with it (I studied network engineer because I doubted myself..).
I never felt that I knew enough of programming or front end.. that I wasn't really "good enough" to apply for a job even though I almost finish the frontend certificate at FCC, did the Android application schoolar via Google and have worked a lot with Adobe CC overall and help people with their front end issues from school, even with library's I haven't touched (mighty power of Google search and quick learning).
Now sit here as a stockmen in my lunch break being all excited for one thing based on a conclusion I took last week.. if I never try to follow my passion for it, I'll stay a stockmen.. so I applied for s frontend job and got a call in for an interview today. I still doubt myself but figure I must try.. I do not wish to stay where I have been the whole year but to move on and work as a front end Dev. If I get it.. than Santa came early and if not.. well.. keep on evolving and trying I guess. *Holding thumbs* -
I need suggestions
I’m thinking about making a blog called but how do I, this will include tutorials that covers things not taught in school, but you wished you knew how to do.
So right now I have ideas like:
How to write zsh plugins
How to scrape the web(scrape html or sending request)
How to write chrome plugins
How to center a div in different ways
How to write backend codes in js
How to setup an interactive website on a server with domain
But I need more, I need suggestions.8 -
ant.design selectors are bogus garbage.
The drop-down selector that replaces the browser's native one does not allow typing to select an entry, meaning to select a language from a long list, one needs to manually scroll to it. If the scroll wheel of the mouse does not work properly, one needs to use the scroll bar, which is far too short to be able to conveniently scroll a long language list.
Sure, ant.design might look pretty (as advertised), and has oh-so-fancy features like fade in/out animations, but from an interaction point of view, that's as useless as the skeleton screens popularly used by JavaScript-based websites (which are anyway inferior in performance and compatibility compared to static HTML pages with JavaScript on top).
Not only can I not type-to-select, but the date selector on Dailymotion, which uses this utter garbage, sends "[object Object]" to the server, so the user is forced to edit the HTTP request manually. Complete utter garbage.
Don't use that shit. Use the browser's native feature. Or use something progressively enhancing like the drop-down menus used by MediaWiki on pages such as Special:Contributions, where it actually is properly implemented.2 -
I can't find a complete answer to this question, maybe this community has one:
Does putting an html file, with pure html code (without any php), as .php have any impact (or is processed differently) on the server load compared to simple .html?
Of course, if the content doesn't contain any php code to be processed it doesn't affect the performance, but the simple fact of declaring it as .php cause a different processing root on the server to output the same html result?
I'm aware that if there is any impact, not sure yet, tt's probably negligible, but I'm just curious about the backend root followed.
So, anyone know how exactly these two scenarios are handled (step by step) by the server?
1) Request of pure html as .html.
2) Request of pure html as .php.
My instinct says there must be an additional step in the second scenario to interpret and search for php code to execute.
There is? And does it have any calculatable impact, that multiples for X requests (ignoring caching) and depends of the length of the file?
Thanks5 -
FEATURE REQUEST
that thing that devrantron does where it interprets html
yeah i want everything to do that
pretty sure lots of others wouldn't mind that either3 -
I would like to share this piece of knowledge for the web devs out there, even though it's probably known:
If you're using the Spring framework and you want to accept a list of items as a multipart/form-data request, then Spring will only be able to correctly deserialize your JavaScript FileList in the backend if you have scripted it as follows:
var data = ev.dataTransfer.files;
var formData = formData();
for (i = 0, j = data.length; i < j; i++) {
formData.append('files', data[i]);
}
The for loop with the 'files' name is key here. Why? Because then it will resolve into:
key=val&key=val&key=val
and that's how Spring will correctly be able to deserialize it into a List. We remember from our HTML learnings that if we want values in a form to be processed as one, we must provide the same name= for each element in the form, otherwise if you have a separate name for each input, it won't be passed on as one collection of values.
This is why my list was originally null when received in the backend.
Courtesy of StackOverflow:
https://stackoverflow.com/questions...