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 - "dom"
-
"hey there is this bug, could you fix it?"
me: sure whats the bug?
*explains the bug*
me:... thats.... thats your feature request from last week8 -
1 minute of Thread.sleep() for Tum, the best cat ever. Rest in peace, your memory will live on in my devrant avatar.17
-
Little Hack
It annoys me whenever I encounter a website like quora which hides the real content with a overlay and a pop up to sign in. Little do they know I just delete the overlay element from the Dom 😁😁.
Who else does this?19 -
My brother just called me asking for help in some MS server thing and I'm like "I don't know that!" (I really don't), and he replied "Yeah, you know, mom told me to call you to ask for help.". Jesus Christ. Just because I'm in CS it doesn't mean I know everything informatics-related.
I now know your pain, devRanters. I usually don't mind being the IT support (so much that my parents call me to help them when their computers decide to randomly die or do something weird because of something they've done, but I live like 300km away because of uni so I can't just go there and help them. Sometimes I say "Ask your son" (he's taking a tech course in high school), but my brother cuts out of it like "I don't know how to fix it" without even looking at it sometimes. Well duh, me neither at times, but google is your friend damn it. Sometimes I search for the answers. Other times I just poke around in the program until I find what's wrong. Either way, when I say I don't know and/or I can't really do much about it they give me the usual "We're paying your uni fees for what?" (in a joking tone but. I'M NOT STUDYING FOR THAT, I WANNA BE A GAME DEV DAMN IT)), but goddamn it I don't know everything just because I am a CS student. I wanna help but sometimes I can't. Deal with that >:V8 -
So, our clients missed their internal deadline this weekend so we as vendor were also forced to work for the weekend and implement new features in a very short period. I implemented new features and my project manager stayed to support the testing and sent me home as I already had tickets bought for the movie.
As someone who hasn't done any developing in a long long time he even tried to implement some changes and complex JavaScript dom manipulation that they asked during testing so that I could be with my gf.
Few hours later he called me and with a sad voice said he is simply too slow and needs my help after all . I came and we stayed until 00h and solved everything. He paid for the movie and taxi.
The thing that impressed me was that he was willing to took over my job so that I wouldn't break my deal.
Best project manager ever!
P.S. Yes my gf went alone at the movie and yes we are still together xD4 -
Oh no microsoft is gonna buy github!
Just like they bought xamarin and turned it from a buggy piece of shit into something borderline useful?
Just like they funded canonical so ubuntu could become a distro what any person can use as easily as windows because they had money to actually hire people?
Just like they bought mojang and invested billions in an education platform?
Oh boy whatever will we do...15 -
Me: Well, it's time to make a new app!
* opens up VS Code *
* opens folder selection dialog *
* creates a new folder called "notes app" *
* yarn inits that folder *
* installs react and react-dom *
* installs webpack, webpack-cli, babel-core, babel-loader, babel-preset-env, babel-preset-react, style-loader, css-loader, file-loader, html-webpack-plugin and clean-webpack-plugin as a dev dependency (install is pending) *
* copies a webpack config from some other project *
* creates a babelrc file *
* copies a yarn script called "build:dev" which would launch webpack *
* dev dependencies installed *
* tries to save *
* vscode doesn't save because files differ *
* tries to copy dev dependencies *
* fail *
* tries again *
* saves *
* writes bare-bones index.jsx *
* yarn build:dev *
* opens build/index.html in firefox *
* gets satisfaction *
* writes bare-bones App.jsx which is a react component but it's an entire app *
* yarn build:dev *
* opens build/index.html in firefox *
* gets satisfaction *
-- trim --
* walks out of his room to his mom's room where's sbc is located *
* grandma plays solitare on laptop *
* i ask grandma for a laptop *
* grandma gives me laptop *
* glues all components into App.jsx *
* yarn start:dev (magic of webpack-dev-server) *
* opens localhost:8080 in firefox *
* searches how to update a component prop *
* nothing found *
* registers on devrant and verifies his email *
* writes this rant *14 -
New years eve plans:
Partying with friends ✖
Getting wasted ✖
Shooting fireworks ✖
Reading godot documentation ✔7 -
open telegram
'hey guys i have a cool idea for a project'
"yeah thats a neat idea lets do it"
we get drunk on the first meeting and completely forget about the project5 -
My boss likes to measure the spacing between DOM elements using a ruler to make sure everything is proportional.
I forgot to remove some padding on an element so it wasn't exactly centered, so he comes in and says...
"the padding on the site is off, I think you need to use this" *drops ruler on desk*
Now I have to keep this stupid ruler on my desk because whenever I forget to align something he says... "that's why I gave you the ruler"
Too difficult to explain to these subhumans that I don't need a ruler to write proper css8 -
Pm: OK what you've got here?
Me: a bug, haven't tested yet
Pm: *grabs a phone* follow me we will do it
Me: mkay
Pm: *attaches it, goes to the DOM inspector, starts clicking random divs* OK where the fuck the canvas is?
Me: uhmm there in this tree
Pm: *inspects the canvas element for a few sec* what do you think?
Me: ... ... Well the bug was that it wouldn't resize properly after you change to landscape
Pm: *rotates the phone back and forth looking at the canvas properties*
Pm: gotcha, see? Width and height
Me: yes, those are the default html prope...
Pm: now see, there's another width and height. That's the malfunction right there. I'm telling you.
Me: no, this is css. It overrides the html properties there
Pm: well, say what, it doesn't
Me: no it does, that's how html works for decades already
Pm: but why does that not work properly then? Mm? *stares at me wide open*
Me: well I need to do some testing before I can sa...
Pm: then what do you think we are doing now?
Me: we jus...
Pm: *gets a phone call, stands up and walks away*4 -
Oh hey i should go to sleep early and work out in the morning.
Or i could implement those new features for my library ive been thinking about.
Or i could polish up some of my older sites.
....or i could stay up till 3am, reading subtly gay korean comics.4 -
When you are working on a feature and someone else is working on the same thing and you commit at the same time and now you have to resolve conflicts but both versions work2
-
Fucking evopdf, I spent 2 days trying to figure out why the fuck my js isn't rendering the html for printing. I created the structure in html already, and it's rendered perfectly with js DOM, when evopdf ran from backend it shows nothing, tried not using external script, tried to put value one by one, it works, my css is also broken, thanks fucker, the client only asked to directly download the html page instead of save as PDF. I thought why the fuck not?
evo pdf modified my CSS element for some odd reason, flex and grid got messed up, page width also fucked along with font size, doesn't support some javascript function. I shit you not the .after and let doesn't work. Fucking garbage
Edit: it worked now, but I spend hours today rewriting everything just to looks decent and it still looks like shit fml6 -
you might think that windows updates are painful but this piece of shit has been like this for an hour JUST LET ME FUCKING DEPLOY12
-
Just trying to change a folder's name on the SD card on my phone... Whoops
I once got it to say "0 out of 100TB" or so. Jesus8 -
full stack web development in 2017: mvvm model, api for backend, parsing on frontend
me: <?php echo "<div>hello".$name."</div>" ?>9 -
The brief history of Facebook open source:
- FB releases React under an oppressive licence that tells "woopsie, can't sue FB if you use React"
- a lot of money goes into making React popular to gain leverage from mass adoption
- VMware bans React in their company
- FB releases Flux to bring state management. It flops. Replaced by what some Russian student wrote in several evenings (Redux)
- Preact is released. It's faster than React, and it has MIT licence. Vue beats React in GitHub stars.
- Under mass pressure, FB changes React's licence to MIT. Initial plan to gain leverage fails spectacularly.
- FB releases Flow Types. It flops. Replaced by TypeScript.
- FB releases their own app market for React Native. It flops.
- FB releases Relay. It flops. Replaced by Apollo.
- FB tries to push React.Suspense for the whole JS landscape to obey and comply to how it works. Community says "Fuck You".
- FB releases react-native-web. It flops.
- Web Components are out in all browsers, adopted as a standard. React doesn't support them.
- Google releases Lit, a virtual DOM framework on top of Web Components to fuck with React. It's a massive success.
- React 18 is out. Still no Web Components support.
- (you are here)17 -
I'm not usually one to spend much time on my phone but I have devRant for 1w now and I spend so much time on it (not to mention all the smiling and giggling some of the posts cause) it caused a colleague to ask it I got a boyfriend... 😅2
-
Worst part of being a dev?
The last 10% of a project.
Being in beta, gathering feed back, sorting through opinions and user preferences. All that takes forever compared to the first 90%.
📈🗓❗️❗️❗️2 -
So I watched this video that tries to convince people, that the jQuery library isn't really best practice anymore and showed how you can achieve basic tasks with vanilla JS, aswell as some frameworks (Vue, React, Angualar) and how they handle interactions with the DOM.
It also talked about how nearly every JS question on SO has top answers using jQuery, and how that's a bad thing.
But what I found in the comment section of this video was pure horror: So-called "Developers" defending jQuery to the death. Of course there were some people who made some viable arguments (legacy code, quick & dirty projects), but the overwhelming majority were people making absurd claims and they seemed quit self-confident.
GOSH!
Want an example?
Look:22 -
"Server deployment is automated from git, so dont merge things into the master branch without permission"
Oh ok
>i create new branch
>push unfinished code because i gotta hurry
>server breaks
Well golly gee seems like you did a shit job at automating7 -
Does anyone else inspect element and edit the DOM when you're browsing to give yourself a better experience?6
-
TL; DR: please save me from IT hell
Note 1: this is a rant that comes after a couple other rants I'm going to call "family business saga" from now on because I feel like this is gonna go on for a while
Note 2: the following may look exaggerated but it's because of how pissed off I am at said person
So I have to help this one family member with his computer but he's worned me out so much last summer that I can't stand him (it's all tech based). At all. Both in person and via text calls. I dread and become pissy each time he's nearby, just his presence makes me want to jump in a hole and stay there for eternity.
And he's not the smartest cookie in the jar when it comes to tech, so he comes to me for help (instead of going to my brother. Aaagh why doesn't he go for my brother as well, it's mentally tiring having to "help" him - as he doesn't learn what I'm trying to teach him even after several attempts). I don't really mind being sought for help when it comes to tech, but this guy takes it one step further.
He entered my room with his computer in his hands saying this friend of his has installed W7 on his PC (why didn't he handle all the things he wants to do, it would save me a lot of anger containment) and that I *had* (it's always "YOU HAVE" because I'm a tech-ish person and I'm in uni for CS) to help him do a bunch of things.
So he boots up the thing and there are 32 updates to do, so I'm guessing that he didn't boot it up after the OS update until now. He leaves my room and I sigh out of relief. He comes back with the AC remote complaining it's too hot in my room and that he's gonna put it down a degree or 2. Jesus christ do not tamper with my AC settings, it's fine to me. The updates are still going on. He leaves again.
The computer takes its time to update and so does he. I'm happily playing minecraft when he comes back, the computer off after updating. He looks at it and says "why is it off?". I reply back "it finished updating.", trying to keep my cool. Even the most simple questions are irritation inducing.
He reboots it and lets it run. After it boots and it's ready to go he just stays there for like 2' without doing anything because the hard drive light was going off. I think he thinks the computer is going to explode if he touches it while the light is blinking 😬
He goes to connect the computer to the internet and gets all surprised that the computer doesn't recognize our home's internet (he has been here before with his computer, I guess, so he had connected, so I think he was expecting it to auto connect like that). I tell him that the computer doesn't recognize our home's connection because it has had a fresh OS installation and so it didn't have any connection registered. He types in the password and the connection is established.
He them starts going on about that he wants to get these pics on the business' website and how does he put them in his computer and all that. I do that for him and he's all like "how did you do that?? 😮" like it's a magic trick
And he's always going on at everything as if it's all a big undoable thing. "How do I do this? You know what, do it yourself and show me because I don't wanna fail". Dude. Bro. Everything - EVERYTHING - you are afraid of doing is undoable. EVERYTHING. Good christ.
I swear I've never felt so glad I'm going back for uni next week9 -
>Middle of night
>css not getting applied conditionally
>a simple ng-class
>me raging
>fuck angular's digest loop
>fuck dom and not giving parse errors
>fuck my life
>Coworker is also confused
>after 1hr, what it could be
>A typo, ifStudent->isStudent
>😑3 -
Psa: i dont give a shit if you use php but dont you fucking dare echo your shit out to the dom or i will fucking gut you you degenerate16
-
I can remove these fucking overlaying popups from the DOM when I want to view the content in the webpage :/1
-
Haha this happened to me once! But it took me a week to figure it out and after re-writing the code and hours upon hours of googling2
-
Did anybody else know that putting comments in your HTML creates an EMPTY TEXT NODE IN THE DOM?
REAL helpful information when you have to GATHER EVERY ELEMENT WITH TEXT INSIDE OF IT!
WHY WOULD HTML EVEN BE LIKE THIS? IT'S A COMMENT! WHY DOES IT HAVE ANY EFFECT, even if it's minimal, ON THE DOM WHATSOEVER, THIS DOESN'T MAKE SENSE!4 -
People that call themselves JavaScript developers but can't figure out how to update the DOM without using jQuery5
-
Well im slowly getting there, but i still dont understand why does my wife want me to make her cam...8
-
"Linux is shit because nothing works on my new DOM 2017/2018 laptop!"
Yes it's true that nothing will work if you put your finking ubuntu 14.04 installation with a fucking old 3.13 kernel in your new Laptop!
Update. Your. Fucking. System.6 -
Why is it whenever a task is something you've done before, and are confident it will take 10 minutes, it ends up making you tear your hear out for 2 hours?6
-
Hey im a fullstack DEVELOPER, not a fullstack DESIGNER, so dont fucking ask a colorblind person to 'just throw a simple design together, it shouldnt take more than 10 minutes'3
-
So our class had this assignment in python where we had to code up a simple web scraper that extracts data of the best seller books on Amazon. My code was ~100 lines long( for a complete newbie in python guess the amount of sweat it took) and was able to handle most error scenarios like random HTML 503 errors and different methods to extract the same piece of data from different id's of divs. The code was decently fast.
All wss fine until I came to know the average number of lines it took for the rest of the class was ~60 lines. None of the others have implemented things that I have implemented like error handling and extracting from different places in the DOM. Now I'm confused if I have complicated my code or have I made it kind of "fail proof".
Thoughts?8 -
ajax hell/dom hell
do you know it? no dont talk abut the callback hell.
i fcking hate it when i load any modern site, and it needs a few seconds to calc some stuff, xhr this, calc that, dom/css visible that. at all it takes more time specially if you on low end to mid equipmemt.
And then you think its finally loaded, you want to click or tab something and then another xhr was Finished, dom/css changed, and the button i was about to Click moved and i click something else.
friends of me hates this to.
so please dear webdevs, stop try to be cool and fancy just because you found out how "cool" conditions in css and dom is. stop using that bullshit angular (and so on) bullshit if you cant manage to pull out a html at start that will not changr its layout all the time after being loaded, ty.9 -
I work in a contract position and reviewed the code of a senior engineer recently. Regretfully I can't provide context to preserve anonymity.
He wrote awful JavaScript;
- handled a single DOM element with 2 different frontend libraries
- used the logical operator && to 'chain' two methods (it didn't work) instead of returning a boolean value,
- broke everything down into minute detail (a comment box had 7 components!),
- API calls were made for every component update instead of maintaining local component state where it made sense, which meant UI updates were slow,
- animated EVERYTHING, which made my Firefox on Xubuntu i7 64bit with 16GB RAM beg for mercy.
I had a rough couple of months with interviews, with 2nd stage technical interviewers throwing impossible tasks at me.
Example:
1. Create an online Python code editor with Javascript which can compile Python bytecode,
2. Use Mesos and Kafka to create real time architecture for Tensorflow with a Javascript frontend in 1 day. (I asked, and wasn't allowed to use Kubernetes or serverless architecture),
3. Hack a website from the browser's address bar using parameters ( what?!! ),
Obviously, the next time I meet a 'senior', I'm going to tell him talk is cheap;
'SHOW ME YOUR CODE.'3 -
Spent 4 hours debugging a “button” styling, worked fine locally but not on production.!
After striking out “cache” issues, “browser” versions, “fonts”, “sass errors” the error was with a stupid chrome extension that appended a css class attribute to the “HTML” tag 😡
And the other developer thought that was a part of what was written in the code !!
Hate these kinda plugins that manipulate the DOM 😪
P S the plugin is "Grammarly".2 -
I never thought I'd see one of these myself...
Damn it Colombo get your act together :V
(Zara, Colombo Mall, Lisbon)12 -
Listening to a song 500 times on repeat because it will take to long to stop what you are doing and hunt for a new playlist/station....1
-
-GDPR
-News letter
-Ads blocker blocker
-Ads popup insite
-Ads popin in video
-Ads popin podcast
-Ads in mail
-Ads in software
-Ads in any android application
-Ads in windows
-Ads in ads
-Auto scrolling
-Slideshow
-Scroll position reset on back button
-Aria-label aria-labelledby aria-role aria-aria of game of thrones
-Order in dom for a11y different of the display order -Button :hover, :focus-visible, :focus-within :fuck-this
- SVG abandoned ware
- I make you a illustrators X version that not work with yours, i use figma. I use affinity, i use akira. I use photoshop, i use word. I use powerpoint, i use publisher, i use paint, i use all Asss (application as a service) on the web and to see what i make you need to pay you an account
-We all make frontend backend... No linter or something... Why we have always 848274 change in git ....
We not host anymore we use 62616 different cloud services to try all the fucking company everywhere
-Make a Drupal CMS to a client that's are to idiots to use it and call you each time they have something to modify
And goes on
Web tooday is fucking crap shit
People realize that you cannot make money anymore with informative website. Then everybody try to squish people at the last drop... Because of selfishness.3 -
Xamarin.forms. True multiplatform* by Microsoft.
*you just have to make sure not to use any of the platform specific features, or write 3 completely different codes10 -
Everytime i see someone listing a shitload of languages, i safely assume that they speak around 2-3 of them fluently. I did some c++ and can write a site in php but they are nowhere near my java knowledge, so i only list them as something i played around with. There is just no way you are fluent in c++, java and javascript because they take half a lifetime to master individually7
-
Rant
So a couple months ago, my dad called me to try and solve a problem he was having in his work.
You see, my dad owns a driving school and he was teaching 14 and 15yo kids how to ride mopeds and their theory exams are made in the school's facility, by going to this website of the entity that rules the moped teaching thing. When the time to have the exams came, they couldn't even see the exams and one of the kids had one of his attempts wasted (they had 3 attempts). We mailed and called the entity multiple times, to no avail, as they told us to "check the website, the instructions are all there". They were also trying to get it together but they couldn't. Here's the "funny" part: the software in which the exams were done ran on XP and there was no way in hell we could make it work on our W10 PCs. Not to mention this is a natiowide problem.
We reinstalled Java to v.7.9 (I think...?) as the "instructions" told us, with no results whatsoever.
So my dad decided to call me and asked me to bring a PC that didn't run W10. The closest thing to XP I could think of was my uncle's Toshiba, that had Vista, so I went to his house and grabbed it and drove to my dad's school. Even in compatibility mode, it didn't work. Everyone was in despair LoL. I was even put on the phone with the entity's technician, who didn't know how to solve it either but was trying, as well with our tech guy.
After a bit of running around and crying inside, our secretary remembered we still had a tower on site that ran XP. We went for the thing and connected it and booted it up. After reinstalling Java and setting security to "medium" (required), and meddling with zoom (the window was too small to show the whole exam and if the window showed up before we set the zoom to 75% or so we couldn't choose the answers) it was finally set to do the exams.
I've never felt so relieved for solving tech stuff LoL. It took me 3h to get it done and I feel it would have been easier if we had remembered about the tower earlier but oh well what can one do.8 -
Flexbox.. Where have you been all these years?!
When I initially started learning web development I remember thinking 'someone didn't quite think this through..' about centering block elements etc in the dom. Those days are now over, I still believe in miracles.6 -
Today I showed and told some of devRant's rants to one of my housemates (I have 2 and they're both non devs) and he said "People can't be that stupid". Oh boy are you wrong
-
One of my house mates just came to my room and asked if I had a charger for her bf's phone and pointed at the headphones jack... I think I died a little inside
(She's not into tech and kinda apologized for it and I just "hey it's OK you don't have to know that". I'm a bit shocked LoL)1 -
There you are, fiddling with next.js webpack settings, because your isomorphic JS-in-CSS-in-JS SSR fallback from react-native-web to react-dom throws a runtime error on your SSR prerendering server during isomorphic asynchronous data prefetching from Kubernetes backend-for-frontend edge-server with GraphQL.
You have all that tech to display a landing page with an email form, just to send spam emails with ten tracking links and five tracking beacons per email.
Your product can be replaced by an Excel document made in two days.
It was developed in two years by a team of ten developers crunching every day under twelve project managers that can be replaced with a parrot trained to say “Any updates?”
Your evaluation is $5M+. You have 10,000 dependency security warnings, 1000 likes on Product Hunt, 500 comments on Hacker News, and a popular Twitter account.
Your future looks bright. You finish your coffee, crack your knuckles and carry on writing unit tests.5 -
Sent a cv to a company because facebook threw their ad at my face and i said why not. They emailed me that they would call me today. I dont have a phone. Its not fucking 2007. Call me on matrix or telegram or even skype ffs.19
-
Battling our contracted IT guys about forcing ESET antivirus onto all of our machines. Just looked at Task Manager to find that it was using 1.6+ GB of RAM on my machine! grrrr !!!!!7
-
Me: We have a style problem.
SM: No problem! I can solve it with JavaScript. I just need to manage the DOM in the Angular Controller :D
Me: Really? I found the solution with just 1 CSS line. -
This is not a troll q, im gebuinely interested.
What sets spa frameworks (say react) apart from a templating engine and some dom fuckery? To me it seems they are all just syntactic sugar on top of these two very basic things (plus routing), but admittedly im not a frontend dev so im asking more experienced people here.8 -
we had a very persistent FOUC
So what I quickly did was on page load, hide the DOM
sleep for around 1.5s and show DOM
people never noticed, the page load was always delayed by 1.5s :D3 -
The more I go through devRant the more I think I wanna work alone... or with a small group of devs I know 😐 (as in, freelancer or something. Not in a company)8
-
SCStudentRant?
I have a subj called "Fundaments of Operative Systems" (or something along those lines), and I have 2 crappy teachers, one for the theory classes, the other for the exercise classes.
The exercise classes teacher is said to be the worst in uni and every time I think about that class I get a bit anxious because I can never do anything in it. Basically we don't get taught code in theory classes and he just comes and says "do this exercise" without explaining anything first. And when he does I still don't understand it.
I bet like 90% of us have no idea how to program in C and we need that for those classes. I hate C with a passion because of this.
In the theory classes, the teacher explains most of the things without powerpoints, and when we don't understand something (either ask about something he said or what's written in the board), he REFUSES to explain or say what's written, because he has "explained it before". He even chuckles as if it was really funny that we can't read his handwriting or just didn't listen because we were writting things down OH MY GOD. So most of the times when I copy things from the boards and then look at them at home I'm like "what the hell is this, this doesn't make any sense, what did he even write" (has some word that looks like what he wrote with ?? around it)
I think they wanna watch us fail. I really do.
I kinda understand the theory classes, but half the test is writing code. How am I gonna write code if I don't understand it? I have a work for that subj to deliver until monday but I can't make it work because I don't know the code I have to write. Damn it all to hell jesus christ
Additional note: they're both in their 60s and should be retiring not long from now so maybe that's why they act so carelessly.
Love the uni, not so much some of the teachers2 -
Can anyone tell me why is it good to use some crap language that transpiles to javascript? Yes i hate js too but 90% of my time using reason/ts/elm is just
>ddg how to do x in y
>no answer
>Js.unsafe.eval "js code"
Like???? None of them is a 100% complete wrapper???6 -
"This is your last chance. After this, there is no turning back. You take the blue pill - the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill - you stay in Wonderland and I show you how deep the rabbit-hole goes."
Said to a new team member before they embarked on a journey of pain as I took them through a huge web app made with jQuery (think: 10K lines of DOM manipulation horror), WCF, and sadness. -
The web is just a fucked up place. Anytime i have an idea and wanna slap together an mvp, i always feel like web standards are just made by people who have no professional training and once every year come up with some bullshit so they dont get fired.
Figure 1: cors
You wpuld think that setting "access-control-allow-origin" to * would let, well, * through, like in every other field of programming, but no, make sure all 97 other headers match or you will just get a cors error. The server expects application/json and you didnt specify that? Fuck you, have a cors error. Both express and flask have specific packages addressing this one problem so i guess im not the only one.
Figure 2: frameworks
Remember reactive programming? Remember rxjs? No you dont because all frameworks reimplement rx with shadow dom fuckery. Did you know you can have your fucking templates with 5 lines of rxjs code? Amazing huh?
Figure 3: php
It still exists for some reason.7 -
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 -
Guess what came in the mail today (more like 1w ago but I wasn't home yet)! Thank you, devRant team :D
Obrigada! :D -
React router is shit
I have never seen more retarded library.
Not only those suckers change the 100% of the API every fucking update for no reason, also they have the most fucked up documentation ever.
No search in the docs!!! Fucking bullshit examples with no such easy things like how to create nested routes.
Please, stop using this piece of shit, I'm tired of working with this fucking abomination. Hope they will delete their shit repo one day.22 -
me: fuck yeah i love java
java: JFormattedTextField tf = ((JSpinner.DefaultEditor) columns.getEditor).getTextField();
me: ...
me: punish me more mommy3 -
Mom: hey I can't get into the phone, the PIN and PUK aren't working. See if you can fix it otherwise you'll have to go to the communications company to ask for a new card (my mom is working and can't do it)
Me: //gives it another try. Doesn't work. Searches online. Yep, can't do anything, it needs a new card
Me: sorry mom, you have to get a new card, there's nothing I can do.
Mom: OK
Me: why did you ask me for help, again?
Mom: well because you can do things and fix things and so, and I thought that maybe you could fix it
Me: 😑2 -
I'm Front-end dev and corporate policy doesn't let me upload *.js files, so I rename them to *.txt and change everything in the DOM without their knowledge...5
-
If you've ever used Vue.Draggable and been as frustrated as I have, try Vue Smooth DnD. It works flawlessly and syncs properly without relying on DOM state. Just what's necessary for true reactive drag and drop. 😁5
-
Hey buddy pal mate, yeah, i get it, you a good frontend dude but if your page lags on my phone, im gonna just close it and never open it again, so dont you fucking use every possible overhead framework known to man.
-
To be honest, I'm not as excited as I was 6-7 years ago when our tech industry seen a big leap, where these ML/Deep Learning algorithms were out performing humans, Apache Spark out perfomed Hadoop in distributed computing, Docker/Kubernetes are the new phenomenon in software development and delivery, Microservices architecture, ReactJS virtual DOM concepts were so cool.
Really though, I've come realise that these software trends come and go. All you need to do is adapt and go with the flow.3 -
Facebook be like
We put react-dom in your react so you can dom while you react and we also put react-native in your react so you can native while you react but we also put react-native-web in your react so you can dom while you native while you react3 -
Me: Oh, man, there are hooks for react-redux now? I don’t have to wrap components in a higher order component to get information from the redux store and dispatch actions? Could this solve the problem I’m having with data fetching and consistency in the app I’m working on?!
Spends entire Saturday writing a basic server, connecting to an mLab instance, filling said instance with dummy data, starting a create-react-app, writing a reducer, action creators, components, etc. just to test how useSelector(), useEffect(), and useDispatch() would work in an application that isn’t just a simple counter (why is it that like every example is always the counter example?!). Bonus, react-router now ALSO has hooks, so got to play with useHistory() and useParams()
Conclusion: Maybe. It does appeal to me to not have the cascade of virtual DOM that you always get nesting HOCs, but I’m also wary of appearing too willing to jump on it just because it’s the new thing.
Has anybody else played around with react-redux hooks? Your thoughts?
Also, yes, I know, not every app needs redux. It had it when I was brought on and I don’t really have the ability to change that implementation detail now.3 -
How the fuck does TypeScript still not have service worker support? Seriously, it's just a typings file. People have written that typings file. They would just have to include it in the lib collection shipped with the compiler. Yeah, it would have DOM calls intermixed with the SW api, but frankly, having the typings for a set of calls you can't use is infinitely better than missing them for a set of calls you can.
The relevant issue is 5 years old btw.7 -
I'm in a programming school that gives only projects in C and a method to learn quickly.
Then we don't have official web classes or anything so we have "Labs" or "Clubs" and last time I was at a web programming club, leaded by students (because it gives me some more credits).
I was very surprised because they began to try to learn us the Javascript without talking about DOM.
And their explications about server-side and client-side codes were not clear (and obviously not exhaustive).
I have some (not a lot neither) experience in web programming so I helped him to make his course more understandable but I can't believe that these courses are given by students who don't have any idea of what's web programming...3 -
I swear to god, if I read another medium post on how you managed to be focused and productive I will fucking... well... roll my eyes, make a facepalm and rant about it on devRant!
Who gives a shit if I'm unproductive and unfocused?!
Well, look at me now, I'm fucking productive while I write about you, you fucking peace off shit! And guess what? I'm not even using any of your 40 todo apps or time trackers. There is no pomodoro timer next to me or framed quotes from Steve Jobs hanging on the wall. Oh, I must be a fucking genius!
But what if YOU became unproductive?
What will happen when YOU start to procrastinate?
Do you really think the world would care?
Oh, but you are not really a writer are you? you're a developer building your app!?
Well fuck, I guess you're going to change the world than?
It's your big project. Your life's work, your legacy.
Let me remind you...
All apps will be abandoned!
All blog post will be forgotten!
Productive people will die!
Focused people will die!
Enthusiastic bloggers writing about productivity will die!
All CEOs and CTOs will die!
All developers will die!
Steve Jobs is dead!
In x years, you and I will also be dead!
Whatever you do, it's not really that important!
It's really not.
You're not going to change the world.
The world doesn't need another app.
The world doesn't need your advice on how to be productive.
You are not special.
Deal with it!8 -
I'm going to have a test tomorrow... And I still don't know the grade of the test I've done over 1m ago (2nd of November)... And people are saying the teacher told them the grade is coming tomorrow when he told us on my class (2 different shifts) that it was coming out today... Someone send help please
In the uni's regulation it says that if teachers don't release our grades for a test 3d before the next one, we can talk to our pedagogic commission and ask to do something about it. People from my course on fb were talking about asking to remove the minimum grade on the average of our 2 tests, but IDK how that situation is and I don't think there's much we can do about it so on top of tomorrow's test. And changing the date of the test isn't really an option because we have 3 tests left on the next week and 1/2 and it's all so on top of each other so the only solution would be to make it after the 20th (that's our last test, and people have already booked flights to go home)18 -
So my dad calls me because my uncle is freaking out about how a client messaged him and he doesn't know how to check if he can do what them asked him to. I tour them around the website he's using (as he understands little to none of it, and my dad doesn't use the site regularly so he's not versed into it as well) as to where they're supposed to look and they go check this one tab. In it, there's info of what is sold out in what day. And for each day it says "day x - y sold out" and he asks me what day it is that y things are sold out, and that it is confusing, and I'm like "are you serious it's right there". Goddamn it this guy sometimes
-
Impulsively purchased a Nintendo Switch. I’m so glad it’s made just for me, you know, it doesn’t say “Nintendo Sub” or “Nintendo Dom”7
-
My JS app can crash IE11. Totally reproducable.
Had a fun debugging session to find out how this is triggered. Happens inside a deeply recursive call in a library I'm using which redraws the DOM.
Found a hacky workaround to avoid that as I see no real solution. It's not like I'm responsible for fixing IE. These are the days where I'm happy I'm mainly a backend dev...4 -
After @BobbyTables asked for super hero names, I'm curious for some supervillains.
I'll start with DOM Corleone7 -
Hey DR! I am a pretty inexperienced programmer who's learning about JS. When I was writing vanilla JS to do some simple DOM manipulation, JS seems like a pretty familiar language. However, when I start to learn about different frameworks (React, Express), the way that they code stuff (IDK how to pinpoint specific examples, it's just an overall impression) becomes very different from my experience with other programming language. I am wondering if anyone have any suggestions, have felt the same way, or know how to overcome this phase.
ps This is a general question. Please don't be pissed for lack of technical detail....8 -
Fucking four hours wasted.
Bad idea
.subscribe(({ messages }) => {
this.messages = messages;
// Scroll to bottom of the chat content
this.chatcontent.nativeElement.scrollTop = this.chatcontent.nativeElement.scrollHeight;
});
because the dom is not manipulated that fast.
Good Idea:
ngAfterViewChecked(): void {
// Scroll to bottom of the chat content
this.chatcontent.nativeElement.scrollTop = this.chatcontent.nativeElement.scrollHeight;
}5 -
A friend of mine removed a paywall deleting the DOM element that covered the page and all functionality from the site was intact.9
-
The longer I work on front-end the more controversial my opinions become:
- Styling a button with display:flex is dumb.
- The DOM is not hard, unlike what the React team wants to have you believe.
- Specifying a <form> action matters, even if it's empty
- ES5 was the real JS revolution, ES6 mostly sugar-coated marketing
- Disciplined BEM (S)CSS is simple and flexible enough for most needs (vs CSS-in-JS, CSS modules)
- If editor support for Jsdoc were as advanced as Typescript, you wouldn't need the latter.
- There are cases where using floats and inline-block displays is better than the flex CSS box model12 -
Found this gem when trying to figure out what transclusion is in Angular. Didn't we all learn in like, 3rd grade not to use a form of the same word in a word's definition?
"ngTransclude
- directive in module ng
Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion."1 -
yeah we use isomorphic async hydrated SSR pseudo-rendering with edge-server chunked ES module CSS-in-JS-in-CSS ESNext TypeScript interop through GraphQL in react-native-web transpilation to react-dom in NextJS isomorphic rendering context React hooks5
-
Today I stumbled across one the worst UX's for a filter I have ever seen, and yes it was a legacy system.
So there is a screen to show a data grid of all orders in the system with accompanying filters; date, status, free text etc.
And there is also a drop-down that allows users to filter by order number, but the genius that made it figured the best way to allow users to search for an order was to render all possible order numbers inside a single drop-down :| and they are not even ordered!5 -
Right now i want to put together a system to automatically water/warm/whatever my chilli peppers, but on the long run i want to embed some microcontrollers into my body.4
-
CSS is utterly retarded but I can’t help but be impressed by how well the DOM still works in this day and age. The fundamental structure hasn’t changed since the 90s.15
-
The past few months i got a bunch of emails and calls from my previous "boss" (hes the head of the research), that he would be grateful if i helped them out. I got a few friends still working on that piece of shit project so i said yeah, i can help.
Now this whole thing is a research involving most of the big universities, lots of math phds, and is kinda secret. They couldnt find anyone to sketch up a few stupid algorithms for them so i did just that.
Yesterday i got the specifications for the task. Its the core functioning algo, the one i made from fucking discrete integer data, it took me 3 fucking months to correct their mistakes, and now they want me to create 2 similar patterns for 2 completely different...things. Yeeeah no.3 -
Tight deadline, codebase not mine, I wrote an hack that read a dom element in the page in js extract some data, append it to the query string and then refresh the page to get the desired result. All the rest of the logic is in PHP. I still feel guilty.
-
My first rant. Woohoo!
Honestly I do the whole shebang ussualy depending on what the needs are from network to servers to coding because for some reason nobody has any technical experience where I work.
I just started app development for a gamedev startup and I am in sheer awe of the amount of transpiling/compiling etc that needs to be done for an multiplatform app for iOS and android with js(x)/typescript, html, css.
I remember when I could just write some spaghetti code to make it working by following a couple of tutorials. Then refractoring and testing it for a couple of hours and be done with it. push it into production.
Now I am lost having to learn OOP, functional programming, reactjs, react native, express, webpack, mongodb, babel, and the list goes on and on...
Why not just make a new backend that does all of that in another language which supports all of that.
I have no formal education in programming/coding and the last time I learned JS it was just some if else, switches and simple dom manipulation.
I just want to get to coding a freakin' game but I have to learn JSX for the front and typescript on the backend.
I am this close to going back to ye ol' lamp stack and quitting this job. 😥5 -
Confession: I've been installing npm packages globally using sudo for years just because I'm too lazy to set it up properly.5
-
Shadow DOMs – the WORST invention in web standard history.
As a user script and user style developer, the shadow DOM has been a massive headache. Shitow DOMs block custom CSS, blocks parts of the page from being saved, and blocks user scripts and browser extensions. Shitow DOMs are an utter nightmare, especially closed ones.
And now, Google Gerrit's entire user interface is shadowdoomed. The only way to save pages locally is to scrape the JSON from the developer tools, but that is not possible on mobile.18 -
I'm living it.
I started an internship at this web store made of different pieces and following no apparent rule or convention. They asked me to do this landing page, but I can't access to the development environment, nor push, create a docker, kill myself, nothing. I have to build from the DOM and write with inline style a page copied and pasted, with 300 lines of CSS already in the tpl, overwritten bootstrap 3 and two main CSS files linked. And "they don't do !important".
I wish I could say I'm learning a lot, but not. My life has become a waste of hours trying to please a company stuck and aged. -
Just created a tiny (not yet stable) selector library that allows you to change properties on multiple elements just like you would do on a single one. It also has some more useful features. https://github.com/kosimst/kazel
Still in development, but prototype should work. What do you think?6 -
With all the rubber ducks and coding companions being thrown around in the rants I'm thinking about getting one myself... I don't think I can talk about code to my house mates (both non devs, they would just stare at me and get bored quickly) and not having something physical to talk to feels weird1
-
When I met her she was just plain html, I took my time and styled her with love, I never loved intruders so I kicked bootstrapCss outta the way,
made my custom queries, and with some vanilla JS she looked like the DOM of my dreams, but now our relationship has grown through the users(years) and things are becoming more object oriented and it feels like I'm no longer in control, first it started with jQuery and some Sass and maybe I thought we could get along, but then came React and his Routers and though they said they'll be partners, 😅😅
Now I know they ....
FEEL FREE TO GIVE THE PERFECT ENDING 😊1 -
I'm sick of a toxic soup of ways to test frontend.
Throw in vitest, jest,jsdom, testing library, @testing-library/jest-dom, together and you are left with n^2 ways things can be configured.
Why on earth do I need to import anything to do with Jest when I am working with a vitest project.
I think such tools are made to get invite opportunities to speak at conferences.8 -
I encountered a really weird bug today in my javascript. I'm working on a CMS and one of the things it handles is adding, uploading and resizing images. So, one function adds an empty image to the dom, unselects the currently selected image and selects the new empty image. Pretty straighforward right? So the problem is the unselect function didn't want to work. The image is added and gets selected but the previous image is also still selected.
I set a few breakpoints checked every variable but everything was the way it should. So after an hour trying things I discovered that if I removed the code where the image get added to the body the deselect function works (innerHTML += element) I thought maybe a little timout between these two actions would work but it didn't work. It looks like all dom actions lock up after the empty image gets added. I didn't understood so I moved the unselect function to the above the image add code and it worked wut ??.
code before fix:
func:
body.innerHTML += html;
unselect();
select();
after:
func:
unselect();
body.innerHTML += html;
select();
Atleast its fixed now -
Optimizing JS is such a pain. like, the total runtime of the rest of the code is not measurable compared to DOM operations, so the goal would be to optimize DOM access, but there are zero resources online on the relative cost of certain operations, and I get the feeling that they don't have much in common across browsers.2
-
me: what a nice day
someone: hey, wanna join our project? its a university thing
me: yeah sure
someone: oh, you r the PM
me: AAAAA -
Why isn't Vue.js more popular? (it's not rhetoric, I actually don't know)
During the last weeks I've been learning the basics of the more popular JS frameworks and from the ones I saw, Vue seemed like the best option (lightweight, virtual DOM, simple documentation, alternative to React Native). Nonetheless, React & Angular are more widely used by companies and personal projects. Does anyone know why that is?1 -
To all the front-end engineers here I have a question. Say I am trying to create reusable CSS web components how do you create them? Shadow Dom?.
If not then how do you make sure the custom elements that you create can be resued in other projects?8 -
Html imports. Polyfil. Hey. Reading, this is awesome. <link rel=“import” href=“control.html”> what could be simpler? Deprecated front end. But only need it for developing. Will combine the files at the end.
Estimate converting php to pure html, couple of days.
Go to use it with polyfill (webcompnents.js htmlimport). Doesn’t work.
Try the light components. Doesn’t work.
Try server-side polymer. Doesn’t work.
So much documentation about it working. Then finally come across shadow dom and how html imports are associated with them.
Hell no they aren’t. They are completely different things. Oh. Google packaged them together? No one could agree on shadow dom, and its now going away? Taking the pure html way of combining files into one page with it???
Spent an entire freaking day. But got 8 lines of code and <link rel=“fetch” ...> to do the same thing.
Why hasn’t this been an html standard for say...years. Why can’t the server do a handshake with the client and serve one page (php-ish) if the feature isn’t supported. Otherwise multiple files asyc. I mean. This is a fundamental part of pwa’s.
Why are these obviously smart people so stupid??? Deploy you shitty shadow dom without this obviously useful feature...2 -
So JavaScript/ES6 is kicking my ass. I'm not used to front end development as much. Idk when to use javascript and how. I dont know when I need to manipulate the DOM and how I do it. It's a new concept and I'm hoping PHP isnt gonna have as big of a learning curve..7
-
My non-developer friend (who knows some very rudimentary basics about front-end web dev through me) asked ChatGPT to create a game with an arrow-key (left, right) movable player that shoots bullets.
He pasted the answer in a jsfiddle. The first iteration didn't work. It used DOM and CSS, so I told him he needed to instruct it to use HTML canvas. Lo and behold: https://jsfiddle.net/mehp8jay/16 -
You can say you know a computer language to a decent level when you can in fact make useful programs with it.
For example, I can say I know JavaScript to a basic level. I know its basic core functionality by heart (which can't be said for some people I know), such as:
- it manipulates the DOM, the DOM has Element, Nodes, TextNodes (all to be found on W3C documents with its own specs)
- useful functions are:
getElementById()
getElementsByClassName()
Also knowing that these return either HTMLElementCollection or NodeCollection because you have to iterate over it differently then
- element.textContent
- == and ===
- dynamic typing
- closures
- avoid global variables
- nodes have parentNodes
- isNaN, undefined
- arr.push()
- arguments don't have explicit types defined
- etc.
Using this knowledge I built an antispam script for a particular server. It's good to know the model of a language, that it sits in your head and that you can use and understand the constructs when you want and how you want.1 -
Me: //trying to fix bugs
IntelliJ: hey you have 2 typos
Me: Where? I can't see typos anywhere what the Hell
Me: //looks up and down my classes/interfaces. It's my name
Me:
Me: Well isn't that delightful -
Pro-Tip: If you change your `div` to `li` and then decide to change them to `span`, check before you replace all lest you end up with `Navspannk` from ‘react-router-dom’. Why are my styles not working? Ah, they are ‘spannkStyles’ now.5
-
<anchor link> for `tel:` makes no sense to add a title tag but you almost have to so I add title="tap to call"> which of course will never get seen by a phone DOM. Hmmmm, what say you W3C?1
-
Just started learning HTML, css and JavaScript. What are the main components to learn thoroughly besides the DOM.7
-
2 week "conference" "meeting" in greece. Thought would also be a nice chance for a vacation. Except the cell network is absolute horseshit here, who the fuck uses 3g anymore??1
-
YouTube lyrics error
Fired up DOM tools and JS console.
Look at some of the codes.
Found out it is extension problem.
Contacted musixmatch
no answer except automated email that they are looking after it.
Then, realized just now. (Yeah, now.) that I don't need lyrics just to hear a song. Wasted 3 days and 14 hours until now. Shit.7 -
I often wonder why JS is the only language that has the native support from browsers and native built in DOM apis?
The world has come up to a saturation point for so many techs:
- if a software is needed to be created for mobile, it must go through 1 layer of java (aka JVM) or objective C (i guess? for ios) before being understood by the CPU
- if a software is needed to be run via browser( which itself is made to run on jvm, objective c or machine language), it must go through one layer of js interpretters before being understood by the CPU
all the OS are made on C but the application and application platforms are made on specific languages. I wonder why can't there be a single application platform, if all of them(browser, JVM,objective C and whatever .exe apps run on) are doing the same thing and are equally mature to handle every usecase?13 -
Music videos and random things that come to mind and I feel like I have to check and then end up getting really far from what I was looking for in the first place.1
-
One of my greatest personal challenges has always been to try and balance "good enough asap" and "but I know how to do this better if I spend a few more days on it". I like to think I've gotten better at it; Leaving things be if they are to spec and keeping my implementations consistent with existing work even if I disagree with it being ideal.
Which makes this new project we're taking over my trial of fire. The combination of the codebase - a Vue app from a previous rant where Vue is mostly used as a callback function to alter the dom using the document api in plain js - and the expectation for us to implement new features and minor tweaks to a user base of literally 4 people is like a charicature of the type of work I struggle with.
Even writing all this I'm evaluating if I'd be able to remake it all from scratch fast enough to sneak it in without anyone noticing.
It's an uh, "opportunity" for me to learn how to handle these situations, I suppose. Have mercy.1 -
How come that im absolute shit when it comes to designing a webpage but i can make really fucking cool looking android apps, when they are essentially the same thing1
-
After waiting for almost a month, yesterday I went to check on how my computer was doing, since I hadn't got any messages or calls ever since.
I go to the store and ask one of the workers about how my laptop is doing, and that I'd left it there almost a month ago and that they'd tell me when it was time to get the papers and then the laptop itself. The girl asks me for my phone number and then my name, and found nothing on the computer. She goes somewhere inside the store and comes back with a colleague, who tells me that I need a process paper. I pull out the receipt the technician photocopied and signed because that was the only thing I had. I hadn't touched that part of my paste for the whole time after I left the computer there and I was 100% sure I didn't have the process paper with me until he started pressing me for it. I kept repeating that the technician told me that they'd call or message me when said process paper was ready, which I hadn't got any of those to go pick it up. The guy asks me if that were the number and name I'd given the tech guy and I said yes. Both of them disappear into the store again. They come back with a cardboard box and say that the surname written there was wrong by a char (as I've said before my name is unusual, and my surname is also unusual where I'm studying, but where I'm from there's like 5 or 6 families with that surname), so that's why they couldn't find it in the computer. After that they went through all the details I gave on the time of handing the PC and the number they told me was there was off by miles. I think I may have said a wrong digit but that number was way off. There should be some person who got calls or messages about a computer they don't even own LoL
They told me to try it and see if it was running OK and that I had 15d to go back if something was wrong
When I got home I turned it on, afraid it would start dying on me again LoL
I pass the login screen and the fan just starts working really hard and I'm worried. The ASUS guys reinstalled Win8 and the CPU is running wild already, going at about 3,5 GHz (2,5 max) and over 30% usage on nothing
After some minor inconveniences (making the USB with Win10 took longer than expected) I finally installed Win10 and the CPU usage drops to < 10% and runs at way below the 2,5 GHz max. It constantly uses <= 10-15% CPU and the fan makes no noise unless I put in a heavier game (like Oxygen Not Included - it asks for 4GB RAM minimum 8I), in which case it goes up a bit and runs at around 3 GHz, but it doesn't make as much noise as before, thank jesus. I'm gonna keep trying to see how it does and hope I don't have to go back to the store after the next 15d 8I
I can finally work and not be a leech on my friends because my old toshiba - which I forgot I'd brought with me to uni - is really old and it makes a lot of noise (the fan is constantly working too much but it's so old I don't bother anymore) and it heats my room a lot, so it's gonna be a nice change of pace HaHa4 -
This is something that I hadn't done or that directly impacted me, but that had an effect in my life several years after it happened.
It's one of those stories that you think "this only happens to others", and then someday you're the "others".
So when I was born, I was, naturally, registered on the health care system. My parents chose an uncommon name for me (uncommon in my country) so I think I wasn't registered by the time of my birth, but 4 months later when all the bureaucratic crap came to an end (long story short, the guy that was there when it started died and my parents had to wait 4 months for another person to be appointed). So, when my parents finally went to register me, apparently, for some reason, the computer took my name and assumed it was a male name. As I've said, my name is uncommon in my country, there're probably 3 or 4 people with the same name here in Portugal.
Why did the computer assume it was a male name AND why didn't nobody check that? Since my parents had to ask to government entities to let them name me that name, I'm assuming it wasn't in their db. So why did it assume male? Was it purposely programmed that, by default, all "newly-registered" names were to be male? Was it random? Who the hell knows.
And how did nobody check that, every time I went to take vaccines? I don't think anyone told my mom that everytime we went there that the data was wrong, otherwise the situation wouldn't have lasted for 14 years.
We only knew about that mishap when it was time I had to take vaccines specifically for women and that I wasn't being noticed of it even though a friend 1y younger than me had already taken hers.
I find this story amusing but now that I started thinking about how it came to life (no pun intended) I'm actually a bit pissed off about how they didn't think of uncommon names and that how that could affect their registry in the system. They could have - IDK - placed "undefined" in that field so that it would caught the register's attention.
Moral of the story: don't assume stuff :v1 -
Maybe some of you will find this useful.
I just finished the first stable version of my JSON-library for Go.
https://github.com/thosebeans/...
It provides a DOM-like interface for JSON-documents.4 -
BLAZING FAST
I never see this said with reference to a fucking hardware driver or a shit hot games engine, it's always used to persuade me to use some fucking frontend framework.
It's JS, running in a browser, polishing the turd of the clapped-out DOM - I don't EXPECT it to be fast. I just don't want it to go completely to fuck straight away. The bar is so low that the core of the Earth is melting it.3 -
Imagine you're in a world where everybody suddenly vanishes when you wake up what do you do with your time and where would you go31
-
So a few days ago I found a programming language called Imba. And I think it is an excellent web programming language. It is very fast, has a clean and easy to read syntax, compatible with any JS library (since it compiles to JS), has inbuilt CSS, can be used to build a full-stack website, and has been in active development for a long time (6 years). It is relatively unknown, so there are not many big projects built with Imba. Two of the big projects that I found so far are Scrimba (an online learning platform) and Iceland's fish auction market.
Some useful links:
Imba website: imba.io
A benchmark website from 2018: https://somebee.github.io/dom-recon...6 -
Started the Course "Web Development with JavaScript and DOM" a week ago. I love it. First time I've tried Bootstrap. It's great.3
-
Half rant, half shameless self-advertisement (I guess)
I created a (currently rather basic) devRant sidebar for atom.io:
https://github.com/sambadevi/...
But this STUPID thing took me WAY too long to code it, the plugin structure was sooo frustrating that I decided to recode the whole thing after I had probably 80% done!
Reminder to self:
Next time just use another DOM element...1 -
CAN 👏 PEOPLE 👏 STOP 👏 ADDING 👏 `/// <reference lib="dom">` 👏 TO 👏 NODE.JS 👏 PACKAGES
It's a Node.JS package, for fuck's sake. But for SOME reason, sometimes to get around the lack of `URL` and `URLSearchParams` in @types/node, people keep including the *entire* DOM typings in their definition files/TypeScript files!
Sometimes I upgrade my deps in a Node.JS project and find that DOM typings have been added, causing errors when trying to use the global `URL`/`URLSearchParams` (I've shimmed these so that these (Node.JS versions) are in the global namespace). Then you have to search in all your dependencies for which one is including the DOM definitions.1 -
Having fun with HTML5 custom elements and shadow DOM. Finally, a genuine way to make widget libraries.6
-
css frameworks are a sign your ui/ux team is an empty bag of chips.
vuetify examples look like toys in their docs and work that way in prod. if you put any two vuetify components together on a page you basically dont have a website anymore. mx px are indicators that your styling abstraction is so bad that adding 8 resize shims to every single node on the dom is the correct solution to your visual spacing dilemma.
css offers so many powerful tools out of the box now, and it takes like a week to actually learn them. instead, we cloak all the functionality and expressiveness of modern css in black-box m a t e r i a l d e s i g n and pretend like obtuse blobs are a viable substitute for coherent, accessible, user-friendly ux.5 -
Why is it that homelessness is suddenly more appealing to me than programming two Remote Desktop connections deep with a template engine no one has ever heard of before and vanilla JS to manipulate the DOM.3
-
Once one of my teachers told me - when giving me and my colleague feedback on a project on Java - that in a certain method we shouldn't be giving as parameters parts of an object, as we're not IKEA or something, when we could be giving the object as a whole. Not the best teacher I've had so far but I still (try to) program by that rule LoL
-
What is your last WTF moment? I will start, today I was working on some abandoned tasks, finished the first one quickly and unexpectedly. I thought It would take more time though. The second task -the shitty one- finished it too, again quickly and unexpectedly. There was a tiny fix I should make, which shown on the image below, I wanted to change the CSS of this select box and the highlight color when the mouse is over one option, I spent about 2 hours without any luck, this shitty box has no trace in the dom or any CSS attached to it, I was going nuts, why the fuck this has no fucking trace in the HTML. Ok, I can change the select element background but it would be applied to all the box and the highlight color for the option element can't be changed. The WTF moment is that I was testing the website in chrome inspect with mobile devices enabled and thought, holy fucking shit this is not how the select is supposed to be shown on mobile devices, it will fall back to the native mobile system select element. what a fucking shit is this, I was going to go mad for 2 hours about this genie element displayed here.
-
Having developer skills comes sometimes in handy in certain situations.
In my case I visited a new website but first I had to choose their cookies.. but.. it was a list of about 150 radio buttons (150 advertisers), I shit you not.
And so I was like: "No, I refuse to click each one of them". I kept thinking.. hm.. how am I going to do a mass-toggle-off? And then it hit me: if the button "toggle all" toggles all buttons.. then that means if I invert the logic of the call, it means I will turn them all off! And it worked.. it was something like: "toggleAll(!-1)" and I did "toggleAll(0)".
That sure saved me some time! Oh yeah and there are of course other situations when you don't want to use a scraper for getting all the;. I don't know.. menu links out of a page. Console > import jQuery > select all elements with 'a' and text() on their DOM node! It can be done with native JavaScript as well document.getElementsById() but yeah, there are plenty of examples.
Hooray for being a developer!1 -
Was supposed to be studying for a test today at 1am (it's in a few hours). Instead starts writing the date in binary, hexadecimal and octal (and then decimal). Go me, watch me fail that test LoL
PS: those dry erase pens were the best thing I could ever buy. I love writing on my windows -
Some time ago Ex-Boss, who's also a Dev, asks for some opinions about which JS framework we should use in our next project. I gave my 2 cents about react JS and he said no, react won't be any good, we must use Aurelia because it is backed up by Rob etc etc. At that moment I thought: wth is he asking, if he has already made its mind on Aurelia? As at that moment react was getting some hype and I knew the features and advantages, I kept going. Boss, react has shadow DOM. React has this, it has that etc. This discussion ended up with him raising his voice, telling me he is much more experienced than me and telling me to GTFO. That's what I did. And thanks God I did it. I respect other opinions and beliefs but If I'm asked to give my own opinion I will, even if they don't like it.
-
Have bought a set of white board pens to scribble on my windows. Have been writting some stuff down on them for a uni project for the past half hour. It's almost 4am. Damn it
-
Spent 1-2h (or it felt like so) fixing this one bug today. I'm still mad about it LoL. I knew exactly what was the problem, just didn't know where it was, and went over that piece of code time and time again and didn't see it... UGH THE FRUSTRATION. When I found the error I wanted to get inside a hole and die of how stupid a mistake it was and how it had been staring at me in the face, mocking me for being so dumb. ARGH!4
-
Today is thursday. Oh no.
At thursdays I have a 8h30-19 schedule (I have 1h30' of free time to go home and cry after I finish a class at 15h30 though) and there's this one class I DREAD. It's a 2h class at 17h and it's an exercise class. This wouldn't be so bad it I actually understood the code behind the exercises, because they don't teach us code in the theory classes (btw it's C. I hate that language because of all this). The teacher pretty much tells us "do this exercise", waits like 10' and then starts to (try to) explain what we're supposed to do. Oh my god.
The other day he was like "write "exec ( ... "text" ... )", compile and execute". It didn't work. Of course it didn't why would it? I was switching around between terminal, manual and text editor, to no avail. In the end he explained but I don't think I got it.
Every time I think about this class I die a little inside and start to become somewhat anxious to be honest. The theory is not that that hard, the practice part is what is killing me (I have test in 2w but I'm just gonna start studying earlier so I can go watch this match LoL).
Does someone know a good book (preferably online, if possible) or a good website on C? I really need to read that, that language is killing me.
Bonus: the other day I had to do a homework that was to be delivered. We had to write a program that read the program and its arguments like this:
./program_name
numArgs
arg1
arg2
etc
I wrote the code, had some bumps in the way, asked a colleague for help because we needed to have a custom function made that was to be done in the class but that I couldn't make because of the reasons above. Then it came the time to test. My VM broke (I think I'm gonna format my PC to try to fix that. Have installed some other versions of the VM but the installations fails or the machine doesn't start) so I sent it to said colleague to test. She said it did OK and so I sent the work to this website we have to send our works to.
"2 errors".
What? What happened? She said it worked just fine.
Looked at my code, couldn't see anything wrong.
Asked the same colleague for help.
Turns out I missed a space. A SPACE. I don't think I've ever felt so frustrated in my life. A presentation error in Java is a good thing, at least we know the program works fine, it's just the output that's wrongly formatted. But C? Nope, errors all around, oh my god. I'm still mad about it.
And I owe her a chocolate.1 -
We don't use programming languages to create websites, we use programming languages to generate DOM.
This could explain 90% of rants -
IDK if this counts as a meeting
Last year, I was in my first uni year. In this subject, we had to do this project and then have to meet with our teacher to talk about what we've done in it, as a way to see if we really did the work and/or if we both had done it.
So me and my colleague get to the room and sit down. He starts asking questions. My colleague answers. I freeze.
I'm a bit socially awkward and anxious to the point it kinda incapacitates me when I'm subjected to some sort of social pressure (read: evaluations). At some point, the teacher turns to me and says "you haven't been talking. Did you let your colleague do it all by himself?", and I faintly respond "No", so he redirects his questions to me.
To tell the truth I was kinda off the loop for the second part of that project, I barely could get anything done and I felt so bad about it. I'm used to doing all the work so not being able to do anything is so frustrating.
He starts asking me stuff and I forget what I studied for it. I just... forgot. I do not cope well with evaluations where I have to actually talk to people. I do fine on tests.
So he turns to us after the trainwreck that were my answers and says "your work is not good. At all. You may fail the subject. I have to see the first part again, but this isn't looking good for the both of you" (the work was to be delivered in 2 parts). I was crushed. I went home and I just cried out of frustration and fear.
We had a 13 in the work. We both passed the subj. I don't think there was any moment I was so scared to see a grade and so relieved to see that I've made it. -
Ah yes i also love when you have so much shit to do for college where you are supposed to be studying developer stuff, that you havent written a single line of code in the past week because you dont have time.1
-
My dad has gotten some annoying viruses in his PC and I'm getting so mad at how slow his computer is and since I'm the techie at home... //ANNOYED SIGH
I shall do it. I shall get my dad's computer rid of this crap but it's so slow oh my god >:V5 -
"Guys best idea to fuc... help the javascript developers. We make a framework with its own events/states and it will not change inputs or anything unless specified in state. Clearly easier to test... I mean how hard can it be?
Even better our framework will be so fuc... Helpfull that they will put an plugin so they can make it work... I mean improve...
Did i say we just throw the html and put everything in our own butchered way? Even better remember that easy
, Style= ? Hahaha we will make it an object...
O yeah and the state must be immutable objects... What immutable means? Who the fu... I mean its easy...
And we make our own virtual dom because... Fu browsers"
-Facebook developer who hates javascript probably
P.S: thanks vue for keeping the double binding.2 -
If somebody needs a project idea how about a really dumb JS Framework that allows you do basic DOM Manipulation, just like jQuery, directly in the elements class attribute.
For example this is how a document could look like:
<body class="init-hide-id-otherElement">
<button class="onclick-show-id-otherElement">
<h1 id="otherElement">Hello</h2>
</body>
What this does is first, at the body's init-* class, it hides the element with id otherElement at page load. Then, when you click the button, the element with id otherElement gets shown. Instead of *-id-* you could also use *-class-* which selects a class.
Basically the syntax is:
<event>-<action>-<id/class>-<the elements id/class>
Of course this has a lot of limitations, for example the selectors are very limited, but it would still be very cool!3 -
You Give Rest a Bad Name!!
By
Dylan Beattie
A parody of 'You Give Love a Bad Name' - about hypermedia APIs. No, really.
https://youtube.com/watch/...4 -
I've been working with Node and Typescript for a while now, and I wrote a wide array of very general utility functions. Examples include:
- Array.filter but you also get the residue array, it can also leave holes in both arrays if you want to join them later
- Array zipping and unzipping to and from tuples (especially valuable when you're manipulating the prop set with Object.entries() in a HOC
- Array maximum selection, with an optional mapper
- Cancelable promises, lazy promises, a promise that resolves when a given function on an object is called (excellent for DOM events), a timeout promise.
- A typed event with both immediate and microtask listeners depending on whether you need state guarantees (this idea I took from a Github gist and upgraded it)
I want to put them on NPM so I don't have to write them and their tests again, and so that if I ever think of an improvement it's easier to propagate it. Do you think I should release them as tiny individual packages which would be nice from a versioning standpoint, or should I make them into a compilation which would be a lot less work for me (and therefore would probably result in better documentation and more tests)?4 -
Goddamn react bootstrap modalbox and select2 dialogbox inputbox freezing bug!@#$
2 fucking days in my mind and I can finally discard you. It was tabindex="-1" on sibling DOM Nodes. Sweet cherry bananas. From now on I'll keep an eye on you. -
Any SUPER AWESOME patient... JS PRO that wants to help me with a few problems it would be appreciated..
Okay so I'm having trouble with JavaScript and this can apply to other languages but for now focus on JS. so I'm learning how to manipulate the DOM and I don't really know how to start I picked out a tutorial but I'm afraid I wont learn a lot from it. here are my concerns and yes they don't all have to do with the DOM
> I don't know how to learn without mimicking what the person is doing and when I try something that's related I cant use the related information and techniques because I either don't remember, dont want to do the literal same thing for something slightly different or dont know how and somethings not working even though it should be.
> I do it one way and when people offer to help its just me getting responses of how it could be done completely different and I dont understand why either way should be used
> Why should I have to generate a webpage or div if I can just use HTML5
>whats the difference between JSON and Arrays???????????
>I am not good with arrays, lists, dictionaries, (I'm stretching to python with lists and dictionaries)
>I recently tried the basic quiz project and it was more complicated and fun than I was giving credit for but I want to do it a different way to show myself I learned but I cant because I dont understand how the person managed to loop through the entire array printing the individual questions and answers to the div. like I understand the parts that use the html tags in the code but I dont know how when or what to use it all
>any good javascript/dom resources?
At this point Im just stressing because all I want is a basic skillset with JS but I dont feel like Im learning anything and I dont know how to apply my knowledge or improve upon the programs ive been learning from or trying to make. and arrays have been tripping me up to especially since I have no clue what the difference is between them and JSON and why I should use one over the other and dont get me started how shit I am with manipulating them. FUCK IM STUPID10 -
My computer has gone to repair so for the meantime I'm computer-less. Which sucks big time because I have projects and tests coming up (not to mention personal projects and other stuff I've been asked to do) and I kinda have to leech off my friends and I don't like doing that, but, for now, it's what I'm doing. My old toshiba couldn't handle whatever I have to do, damn thing should be going through menopause or something. I wasn't a good owner LoL
I never really know if it'll boot during the first minute after I turn it on or if'll take it hours to do so, so I don't wanna risk it taking it with me to uni 😬 Not to mention it's still running Vista 😅
So my brother left to go to a friend's house until sunday so for the today and tomorrow I have access to the beast that is his computer ☺
I don't mean beast as a bad thing, it's a good computer, but it has an almost full SSD and I need to install a couple things so I can work on it :') (I'll uninstall them later and try to leave it as I found it LoL)
I can finally take a bit to play as well 😥 as I haven't been able to do so, as not only my PC is on repair, but I've been leaving uni late (after midnight - I valour my sleep OK). Luckily one of my house mates lets me use her PC after she goes to bed or her bf arrives to our house. The other day I managed to install steam and play a bit (she gave me permission to do so and I uninstalled them later) 😂 her computer almost died on me, it only has 4GB of RAM :') poor thing was over working to keep up LoL
Now, my brother's computer has a mechanical keyboard and besides the macro keys (they're on the far end of the keyboard, where you'd expect the shift/ctrl/caps lock/etc keys to be), I'm loving it tbh. It's a cheap keyboard, my mom didn't want to buy anything too fancy for him, but I like the sounds it makes 😅 may get one for myself (a mechanical keyboard I mean LoL. I really liked one I saw here on devRant that looked like a typewriter but it's WAY out of my league for now HaHa) -
Useless JS library #1 ready:
A paned-tabbed js grid, where cells can be iframes because every grid operation only changes the css and the cell itself is never moved in the DOM. The purpose is to support complete sandboxing of untrusted snippets, so we could even let users pick their own modules if they want extra functionality.
Soon I'll clean up both this and the messaging and put them on github, but to me writing these is a creative process and the working prototype is everything but readable.
In the meantime I put it on
http://test.tardigrade.dynu.com6 -
Me: OK (I have a test on a couple days from now, I have to study)/(it's 3am I have to get up at 9am - I try to have a good sleep schedule OK)/(I need to get up and get ready to go to uni)/(some other thing I should be doing). I'm just gonna check devRant real quick.
//30' later: still on devRant
Me: Goddamn it not again -
Floating point numbers! 😖
Writing geometric algorithms for CNC machining... you'll find those 10th decimal place inconsistencies real quick!1 -
!rant
One of my housemates had a problem with her iPhone (an iPhone 4), which was showing her a black screen. I asked her if she had tried to restart it, and she said she'd taken out the SIM card and and put it back in and it was still giving her a black screen. I told her that holding the lock and home buttons at the same time for a few seconds restarted the thing. Seconds later she was messaging me in all caps saying it worked.
I guess the "turn it off and on again" really does work LoL2 -
Who else was fascinated by the DOM when first encountered? When I first began my journey as a programmer I found that the term Technology was always set in strictly a physical sense in my mind; that is until I started to realize that every language is in fact a piece of technology, which is supported by massive libraries. Then I realize that the DOM is another standardized technology that structures the web. And of course as I gained more insight and got introduced to more "technology" the clearer it became. I'm just glad we have so much selection in terms of this technology. Whether it's a language you want to use, a particular OS, Vm, framework or the plethora of others begging to aid and assist.
-
Maybe I am beyond sanity or I'm ignoring myself as a masochist, but I find dividing huge-ass React DOM lines into multiple smaller components then reconnect everything extremely satisfying.
It's like, cutting a human body into small pieces, and tidy the parts up into a small compartments, BUT still connect the bones, muscles and nevers so that somehow, the dude still lives.
You know what, I'm going for the "beyond sanity" thing.
But worth it.6 -
I once was working on my family's business during summer and was doing something on the laptop that was there (according to the owner, it was in a "good shape" - oh my god that laptop nearly gave me cancer: an old Toshiba, running W10, with half the F keys not working - specially F5. I CAN'T LIVE WITHOUT F5 OH MY GOD -, and also the ➡ key (arrow keys). It was bought in a flea market and some IT guy, a friend of the owner, repaired it a bit and installed the OS because a laptop that old ran WinXP or Win Vista for sure) when suddenly it died on me.
I rebooted the thing and right before the time it should be showing the windows logo, the screen froze (on a black screen with some text) and it started to beep. Loudly. A loud continuous beep. I turned it off and on some times after that, seeing if turning it off and on did something (as it seems to work LoL) and it continued with the beeping. After a quick search I found out that that was a common problem with Toshibas that old, and that I needed to press F2 (that key worked thank god) when the black screen with the text showed up (I don't remember what was written there, it were some booting instructions, I think).
It worked. Great. Now the N key doesn't work when I press it. Greeeeeeeaaaaaat. Also it seemed that, when I opened the start menu, it would automatically write "nnnnnnnn(...)" without me pressing any key (pressing any key would make it stop though, maybe it was stuck).
Then I told the owner not to turn it off, because the laptop would start beeping and such (and I know he'd panic about it).
From then on I think it went off for good and now he's been using his own Toshiba, that runs Vista and is slow as all hell.
Moral of the story: he should have been used his crappy PC from the beginning, at least all its keys work
(Note: watching him type hurts my soul. When one is used to use both hands to type, and is fast-ish on the keyboard and uses tabs to change fields, watching someone type with only one hand every 2" or so and using the mouse to change fields hurts. So much time wasted 😭) -
Sometimes I feel that devRant freezing my phone is its way of telling me to do something with my life LoL
Except I can't really do anything right now as I'm on a hospital far from home 😕 Should've brought my laptop, I was working on a thing last night before going to bed and the hospital has wi-fi 😑3 -
React: I'm the best! From FaceBook
Vue: I'm simpler and better! From Community
Angular: I'm the best! From Google
jQuery: LOL kids! I simplify HTML DOM tree traversal and manipulation... I'm immortal.
React, Angular and Vue: You are right jQuery! But the trash can is across the door. Ciao!1 -
Today I regained my freedom =]
And if I manage to keep it for about 2 months I'll become completely free...
( or otherwise domless - dom in BG ( and other languages ) means home/house ) ;)6 -
Is there a sane way to allow external styling of vanilla web components' shadow dom? Right now I do it by using 30 CSS variables, but I feel like there should be a better way.7
-
Quick questions for all the devs out there
What was the weirdest dev thing you've done/tried to do in the "real" world?
And/or
What was the weirdest "real" world thing you've done/tried to do while developing?1 -
In the time between my 1st and 2nd semesters I had this course to help develop our soft skills. In one of the classes the teacher asks what we wanted to do when we finish our courses and when I said I wanted to make games someone snickered behind me 😒 maybe I was a bit too enthusiastic (I'm super pumped about it, I just wanna be out there and make games and make people happy. It may sound childish but it's what I want to do. After all, I'm still 14 😜 (jk, people look at me and think I'm younger than I really am. I've been even "put" in 5th-8th (12-15) grade once, when I was in xmas vacations from uni, early this year)) but no need to be rude 😒
-
This project is such garbage. JavaScript built at runtime with JSP bindings, every form is submitted with Ajax even when it doesn't need it. Ajax calls with HTML in a JavaScript string sent to the server only to be echoed back to the front end to build DOM elements. I literally can't even.2
-
Why haven't anyone told me about Aurelia before? I've been rewriting an Angularjs app, and tried both angular 2 and react. Not to step on anyones toes, but React isn't that great if you ignore virtual dom, and angular 2 is just.. wrong. The rant? Yet another framework I need to learn.8
-
Don't you love it when your CSS has two equally valid positions so doing and then reversing a DOM manipulation leaves the site in a mess?1
-
TL;DR, which is the best JS templating library?
I've been using React for a while since I like the library's ideology and how simple designing templates is. But for the sake of future technologies, I've been wondering if I could get out of React and start coding with native JS.
The only problem is constructing the DOM, which gets super ugly with vanillaJS. So, I want to ask the experienced members of devRant which library would best suit my use case.6 -
@dfox why do some of the older rants display the date on the rant but then the comments are older than the rant itself (for example, the rant say 22/09 - or 09/22 to you - and the comments say 16-09. But most of the comments I see say 16-09). What did you guys mess up 😛2
-
I actually hate to work when there are kids around.
I get so unfocused when they run amok and shout around that I put points in front of my class names in DOM elements.
<div class=".fuggin-hell">
OF COURSE MY SELECTOR WON'T FIND IT!
Yet another reason to not be a parent, I guess.5 -
I finally got to code something yesterday (I've been slacking OTL everytime I open the Java IDE I use my motivation flies out the window) and I've written down some things to help me do what I need because I forget it if I keep it all in my head. Not that this is a big thing, but it's just to help me to not forget what I've learnt, because I know that'll happen if I don't code.
So I'm coding and checking my notes and all, headphones on, heavy metal blasting, I guess I could say I was in the zone.
Suddenly I get a message from my dad asking me to come to the living room. Turns out my mom had been calling me but I couldn't hear it because I had the headphones on... again 😅 (Sorry mom 😇)
So I left my things and walked to the living room. My mom wanted me to put 2 images I've made for her together. I sat on the couch and waited. And waited. I waited more than I've coded before they called me. I was getting impatient because I was trying to code and I'd been called to wait ;u; I thought I could do it in her computer because it was a simple paint thing so I didn't need the editing program I use.
When she finally showed me what she wanted me to do and I noticed that I hadn't edited one the image she provided me correctly (it didn't look good either way, I butchered the logo she'd given me because stray pixels are a thing that exist 😒 reducing the image also kinda killed it 😅). So I come back to my room and edited it again and made it look a bit better, did what she wanted me to do in the first place and emailed it to her. I went back to the living room and checked it it was good and went back.
I lost too much time and the motivation to code. Played for a bit and then forced myself to go back to coding because I didn't feel motivated (not that I don't like coding, I just lack the motivation most of the time). When I realized it it was 2h30 am and I was getting tired 😴2 -
I took a project. Wild mix of php and html including db stuff and data processing. About 200 files, some 3000+ lines long with if else cases processed in another template/logic behemoth...
I wrote a js file included it at the footer of the monster and update dom + data via ajax on my own api implementation because I'm too afraid to write in any of those files.
I've been told its quality code and well documented3 -
So I tried to fix an app today that we made for a client ...
It's a Cordova project that's basically jus a wrapper for a certain section of the client's website that's displayed inside an iframe inside said app (with a bit of additional CSS and such). It's all working fine.
Said section of the website offers two to four different options to choose from, then scrolls down (triggered by JavaScript, window.scrollTop or JQuery's equivalent) to the next selection panel that's dynamically added to the DOM tree, the content's depending on what the user selected before.
The problem is, said scrolling effect inside said iframe does not work inside the iOS version of the app (does, however, when the content of the iframe is viewed (by just visiting the URL) inside Safari), instead, the iframe just scrolls back to top.
So after five and a half hours of depression, anger and rage, also some repetetive cursing towards Apple (just like every time something has to do with their awful products), my boss walks in, looks at me and says:
"I'd be fine with it, if I just had to manually scroll instead".
.........
If it wasn't 5pm already (I usually go home at 6), I would've just left the room / gone home or gotten my salad from the fridge to have something to release my anger on.
Seriously though, what the fuck!? -
Why TF is it easier to make a modal component with vanilla js compared to react? Like is ReactDOM the only way to add shit dynamically?7
-
I wrote my first proper promise today
I'm building a State-driven, ajax fed Order/Invoice creation UI which Sales Reps use to place purchases for customers over the phone. The backend is a mutated PHP OSCommerce catalog which I've been making strides in refactoring towards OOP/eliminating spahgetti code and the need for a massive bootstrapper file which includes a ton of nonsense (I started by isolating the session and several crucial classes dealing with currency, language and the cart)
I'm using raw JS and jquery with copious reorganization.
I like state driven design, so I write all my data objects as classes using a base class with a simple attribute setter, and then extend the class and define it's attributes as an array which is passed to the parent setter in the construct.
I have also populateFromJson method in the parent class which allows me to match the attribute names to database fields in the backend which returns via ajax.
I achieve the state tracking by placing these objects into an array which underscore.js Observe watches, and that triggers methods to update the DOM or other objects.
Sure, I could do this in react but
1) It's in an admin area where the sales reps using it have to use edge/chrome/Firefox
2) I'm still climbing the react learning curve, so I can rapid prototype in jquery faster instead of getting hung up on something I don't understand
3) said admin area already uses jquery anyway
4) I like a challenge
Implementing promises is quickly turning messy jquery ajax calls into neat organized promise based operations that fit into my state tracking paradigm, so all jquery is responsible for is user interaction events.
The big flaw I want to address is that I'm still making html elements as JS strings to generate inputs/fields into the pseudo-forms.
Can anyone point me in the direction of a library or practice that allows me to generate Dom elements in a template-style manner.4 -
so does anyone know about various social media clients that are true bots and not ones that actually register with the service but just emulate a web browser and fill in parts of the rendered dom and press buttons and shit ? i really don't want to have to write one in electron.14
-
In legacyCode, somebody mixed jQuery data-toggle with custom JS triggers that toggle the target's DOM node, and to "fix" the mess, set display: block !important.
Took me too long to remember that Firefox dev tools show JS events (while my Chrome dev tools don't - why?) now I'm on the right track towards a solution...4 -
started out with react.....its been a fucking week hopping from documentation to youtube to udemy, edx, pluralsight, blogs and what not..... All hit me at once: babel, webpack, ecmascript, fuckin hell.... Cant even set up my machine on my own without any boilerplate to just start working with a fucking framework ..... Uughhh!! Finally found a setup guide on scotch.io.... Followed the steps using yarn(as thats what the tutorial creater used). Worked flawlessly. Tried to imitate using npm, doesn't work.... Why? Fucking piece of crap framework... Steep learning curve..... Cool logo tho.undefined webpack-server react-dom babel-core 😒🔫 babel-preset-es2015 webpack babel-preset-react react2
-
reading the project's code, following "save" callback in jvascript, i find this comment "IMPORTANT : this is a workaround to solve memory leak" and below it code that basically removes all elements from th DOM and adds them again.
so basically, someone could not find a cause to a memory leak and decided "solve it" in a specific place by reloading almost an entire page -
Have anyone experience unexpected behavior using JavaScript? So I wrote this script that manipulate the DOM... however on over clicking a button... Something breaks, however the deadline is tomorrow. Code review is successful. I am sure no sane person will click a button that many times 😅10
-
stateofjs survey reminds me of all that's wrong with JavaScript: too many frameworks each of which has to reinvent the wheel and depend on too many node_modules child dependencies, most don't support TypeScript properly (ever tried to convert a node-express-mongoose tutorial to TS?), there is still no proper type support in JS core language, and browser features get added in form of overly complex APIs instead of handy DOM methods.
Instead the community gets excited about micro-improvements like optional chaining which has been possible in other languages for decades.
At least there is something like TypeScript, but I don't like its syntax either, it's overly verbose and adds too much "Java feeling" to JavaScript in my opinion.
Also there is too much JS in web development, as CSS and HTML seem to have missed adding enough native functionality that works reliable cross browser to build websites in a descriptive way without misunderstanding web dev for application engineering.
After all, I'd rather have frontend PHP than more JavaScript everywhere.
Anyway, at least the survey has the option to choose how satisfied or unsatisfied people are about certain aspects of JS. But I already suspect that most respondents will seem to be very happy and eager to learn the latest hype train frameworks or stick to their beloved React in the future.5 -
I know javascript now, should i continue with it and learn deeper dom manupilation and es6 or start learning a framework like angular or react - nodejs? If yes wich framework to atart with3
-
I have already ranted about this so I'm just gonna leave this here: https://www.devrant.io/rants/258842
I'm only on my 2nd grade so it may get worse but so far, the theory teacher in that class. Without a doubt -
Can JS events bubble in trees of objects other than DOM nodes? If so, what properties do I need?
I tried to read this: https://dom.spec.whatwg.org//... but it's stupid long, references a bunch of other functions and I got lost in between the variables.
I'm kinda confused because it often uses type checks (i.e. if target is a Node or a Window object), which goes against the very point of duck typing.
I could technically make my nodes into DOM nodes, but I'd rather have them inherit from Worker.1 -
DOM manipulation in React apps such as
div.style.bottom = '20px;'
is a bitch to optimize.
Anyone got any tips?10 -
On https://reactjs.org/docs/... it is declared that useEffect runs after render is done.
However... if you put into useEffect an expensive calculation or operation e.g. "add +1 to x billion times", it will get stuck after updating the data, but before the re-render is done.
This leads to inconsistency between the DOM and the state which I believe is a foundational point of react. Moreover, the statement that "useEffect runs after render" is false.
See also: https://stackoverflow.com/questions...
The solution is to add a timeout to that expensive operation, e.g. 50 ms so the re-render can finish itself.
The integrity of my belief in react has received a shrapnel today. Argh :D Guys, how this can be? It seems that useEffect is not being run after re-render.13 -
The shadow DOM almost is DRM (digital rights management) in disguise. You can see it but you can't save it.
Don't forget who invented the shadow DOM: Google.7 -
Organizing some documentation and variables & constants on a uni project I'm doing. Eclipse stop "\n"ing every time I switch things around damn it. It's almost 3am leave me be >:V
-
Being pretty much the only one who has some knowledge of how to code and get my way around tech (even if minimal, I'm too lazy for my own good) in my familiar household - and by extension, my family (Family extends FamiliarHousehold - LoL I'm sorry) - (my brother is on his first grade of a programming course in high school, I'm a 2nd grade uni student aiming to become a game dev) sometimes I wish I knew nothing of it.
Don't get me wrong, I do like working on code (if in Java. C is making me wanna tear my eyes out) but sometimes ignorant family members push me through the edge.
I worked on a business thing my family started this summer and one of the "jobs" was managing everything via a website.
Fair enough, I knew nothing of it when I started but I learn fast and just like that I knew my way around it. The problem came when I had to teach the person who started the project how it worked. This doesn't sound all that bad except he is kinda in the stone age regarding informatics.
He got a computer a few years ago and he pretty much only played poker in it, and he still had one of those old nokias you could throw to a wall and get a hole into it. The computer is like 9y and runs like crap.
To make things worse he bought a new phone, a smartphone, and pestered me to teach him. I swear trying to teach him is like repeating the same thing 1000x and pray he keeps it in his head. Spoiler: he doesn't. ( sanity--; )
So to try and easy my suffering I decided to make a manual for the website (which is outdated by now because the team behind the website did a 180 and some things looks different), but it acted as if I'd done nothing. ( sanity--; )
To top this off he keeps on saying I don't wanna help him. ( sanity--; )
This kept going for the whole damn summer, and meanwhile I had to go back to uni and in the first days I still got like 4-5 calls/day, half of those might about the smallest things because he's so panicky.
Like (both examples happened while I was still there but it kinda goes along those lines sometimes):
- (During the period they changed the website the first time since we're there; they were mostly doing changes back and forth and testing because it had a new layout for a day or 2 before going back; also the site was totally functional, except for a thing or 2)
Him: "They're changing the website, why are they doing that?"
Me: "Because it's their website and they can?"
Him: "WHY DIDN'T THEY LET US KNOW"
Me: "They don't have to, they don't work for you." ( sanity--; )
Or (during the same period; the pages have a menu on the left; one of the submenus has a counter that resets every time the session ends; during that maintenance time they must've "disabled" the function because the number kept growing even after the session ended):
Him: "WHY IS THE NUMBER GROWING?"
Me: "They're working on the code, relax, it's nothing."
Him: "But why." ( sanity--; )
The only quesion he pretty much hasn't asked me yet is why "Is the website's colour this one and not that one?".2 -
When documenting some stuff in Eclipse and you separate the parameters from the actual explanation with a - and hit ctrl+shift+f (refactoring) so the - goes to the next line along with the explanation... good thing I only documented 2 methods so far LoL they have like half a dozen parameters though o-o
I wanna thank the comment I just deleted for making me realize this LoL better now than when the whole interface is commented good jesus -
I was going to say Adminer, but apparently VirtualBox too. I don't know which one I use more.
Also, my own library for DOM manipulation. -
Best part of being a dev?
Not there yet, but as long as one has the knowledge, one can create anything, and make people feel connected to their creation.
At least that's what I'm aiming at1 -
Developers (and students in general, but specially informatics students 😛) should be the only people that wonder why the thing they did work AND why it doesn't work
-
Took me some days (considering I code every week or so since that when I open the IDE my motivation is nowhere to be seen) to realize that instead of writing "implement" to implement the methods of an interface I was writing "extend". I mentally facepalmed. Why are you so stupid sometimes brain
-
I finally used jQuery in Angular 5 to animate numbers. I am also using angular animations Hostlistner too many things to manipulate Dom. I am wondering about side effects. For now everything is cool?!!!!!!3
-
A year ago I built my first todo, not from a tutorial, but using basic libraries and nw.js, and doing basic dom manipulations.
It had drag n drop, icons, and basic saving and loading. And I was satisfied.
Since then I've been working odd jobs.
And today I've decided to stretch out a bit, and build a basic airtable clone, because I think I can.
And also because I hate anything without an offline option.
First thing I realized was I wasn't about to duplicate all the features of a spreadsheet from scratch. I'd need a base to work from.
I spent about an hour looking.
Core features needed would be trivial serialization or saving/loading.
Proper event support for when a cell, row, or column changed, or was selected. Necessary for triggering validation and serialization/saving.
Custom column types.
Embedding html in cells.
Reorderable columns
Optional but nice to have:
Changeable column width and row height.
Drag and drop on rows and columns.
Right click menu support out of the box.
After that hour I had a few I wanted to test.
And started looking at frameworks to support the SPA aspects.
Both mithril and riot have minimal router support. But theres also a ton of other leightweight frameworks and libraries worthy of prototyping in, solid, marko, svelte, etc.
I didn't want to futz with lots of overhead, babeling/gulping/grunting/webpacking or any complex configuration-over-convention.
Didn't care for dom vs shadow dom. Its a prototype not a startup.
And I didn't care to do it the "right way". Learning curve here was antithesis to experimenting. I was trying to get away from plugin, configuration-over-convention, astronaut architecture, monolithic frameworks, the works.
Could I import the library without five dozen dependancies and learning four different tools before getting to hello world?
"But if you know IJK then its quick to get started!", except I don't, so it won't. I didn't want that.
Could I get cheap component-oriented designs?
Was I managing complex state embedded in a monolith that took over the entire layout and conventions of my code, like the world balanced on the back of a turtle?
Did it obscure the dom and state, and the standard way of doing things or *compliment* those?
As for validation, theres a number of vanilla libraries, one of which treats validation similar to unit testing, which seems kinda novel.
For presentation and backend I could do NW.JS, which would remove some of the complications, by putting everything in one script. Or if I wanted to make it a web backend, and avoid writing it in something that ran like a potato strapped to a nuclear rocket (visual studio), I could skip TS and go with python and quart, an async variation of flask.
This has the advantage that using something thats *not* JS, namely python, for interacting with a proper database, and would allow self-hosting or putting it online so people can share data and access in real time with others.
And because I'm horrible, and do things the wrong way for convenience, I could use tailwind.
Because it pisses people off.
How easy (or hard) would it be to recreate a basic functional clone of the core of airtable?
I don't know, but I have feeling I'm going to find out!1 -
So, some of you know that I'm having struggle manipulating Youtube iframes with jquery or plain javascript, please note that the same thing can be done via YouTube API but I personally do not want to rely on API,
So after 2 days of struggling I've officially given up, I feel so fucking angry and sad at the moment I can't even describe.
For some solutions to work I need SSL certificates.
the closest I could get was $(iframe#youtubeiFrame)['content'];
This leads to the youtubeIframe root #document but I am unable to access that DOM
Next task, to configure another IDE except Eclipse for Demandware.
$options = array('Aptana'=>'IDE','IntelliJ=>'IDE','VSCode'=>'textEditor'); -
In react.js?... with react visual-DOM concept, does it fully support and work well with third party libraries ??6
-
How to write tests for a scraping script cause the website dom may change at anytime so using a website is not an option while writing tests .4
-
insertAdjacentHTML. Who comes up with these names. Surely insertHTML would've been enough as ANY HTML is "adjacent" anyway??1
-
What's up guys any devs from San Diego? I'm currently looking for a job or projects to work on. I'm fresh out of code bootcamp at LEARN Academy. Any Ruby devs out there?2
-
This is not a rant, but I've searched this for some time now and can't seem to find it so maybe any of you will be able to help me.
A good few years ago, when I was still a 4-5yo I had a Win95/98 (I don't remember which). We used to have this CD that had a bunch of games, like Chucky Egg or Mahjong, or a xmas-related one (where you could bake cookies, serve drinks - there was a red and a yellow one - and more I don't remember), one with a (purple?) dragon (in a dungeon, that was played in levels, but every run was randomly generated, I think), and many more.
The CD was white with black text, and had a yellow-ish/orange-ish grinning face, that looked like a man's, with a few hairs, that was drawn simply, nothing too complex. I also know there was this one game that made the computer/game freeze, and that was in a blue palette?
I played the crap out of that CD with my mom, and she used to play the dragon one for me (until she found out Mahjong), but it all ended when it broke inside the tower and we had it replaced by the WinXP tower we currently have at home (and that's in pieces because me and my brother disassembled it).
I know it's not much, but does any of you remember anything like what I just wrote? It should be from around the 2000s and probably from a gaming magazine.5 -
I do not fully understand this.setState in reactjs with async functions, so I posted a question on SO,
https://stackoverflow.com/questions...
I have accepted the given answer as it makes sense. but in reality the solution does not work, can anyone shed some light on it?14 -
Im hoping to get in to this anime named kaidro, they are letting fans have characters in the anime and im hoping to get in, ill post if i get in or not2
-
I'm going to have test on monday about this one subj and today was the last theory class before the test. When the teacher asks about the time complexity of an algorithm in the best case some people reply "when n is 1". I can hear the teacher facepalming already LoL
-
Does anybody experience the app freezing (and freezing the phone) and then crashing after some time?
-
I've set one of my contacts' ringtone to the "IT Crowd" (I haven't actually watched that series yet) "NO! God please NO!" audio bit so I know when that specific person is calling me... I'm glad I don't get his calls anymore, or not as often as they were...1
-
I recently refactored a form with complex client side interactivity for one of my clients replacing jquery with vuejs in the process and I'm absolutely baffled by how easier it is to reason about everything when you think of the UI as a function of the state. Only devs who have done both imperative and declarative DOM manipulation at some point in their life can understand the joy of doing this. And all of this can be done with just a simple script tag without having to bring in complex build process that has plagued the Javascript ecosystem.
-
You choose a superpower in the comments and the first person who replies (me included) chooses a side effect13
-
//Not meant to be a rant
I'm doing the doc for a uni project and IDK how to comment our interfaces (not talking about the methods - I can get my way around those) (it's a pair work and my colleague told me to do the doc because I type faster than her 😛 I don't really mind tbh). What should I write as a description of the interface, everything I think about sounds stupid LoL
For example: there's an interface for an activity (which requires 3 arguments to create an object Activity). Do I simply go like
/ * *
* Activity
*
* ( we have to put our names )
* /
Or should I write something more/else? Any tips?
This is bugging me all the way to hell and back -
Sticking to the man... or facebook sorta.
Using Selenium so I can get all the group feeds in Chronological order rather than Recent Activity... Why the fuck is there still no way to set the default.
Now that I think about the better way is to create a Service app that checks for updates and loads them into a DB and the Client app that just reads from DB. So Updates come from Selenium/Chrome in the backgeround thread while UI doesnt need to lag/wait...
fck... all those Async code for nothing.... (yea i m thinking while i mwriting this... an epihpany moment...)
One thing and the original question is, is there an existing Facebook scraper. OpenGraph doesnt work for Group posts or public events which is what i want the feeds for....
The problem though the AJAX calls for more posts when you scroll down. I am not sure in Selenium how to make the Driver wait for new content in the DOM... rather than just sleeping the Thread for X seconds and checking after.4 -
!rant
To all the devs that got their stickers + @dfox and @trogus: do the stickers adhere to uneven surfaces without leaving glue or bits of the sticker material behind? Because I've reached the amount of ++ needed to ask for my stickers (I'm gonna ask them around xmas time so it can be like a xmas present 😀 and also so my brother doesn't take them) but I don't know if I can safely stick them there and remove them if need be
My computer has this circular pattern around the ASUS logo and the area around the touchpad is also uneven, it has some grid pattern
I don't have any stickers on it so devRant's may be the first :D5 -
HTML: Tags. I fucking hate them. Yes, Emmet makes it fast and simple to create them, but when restructuring or deleting things it becomes a mess every time. And I cant use a templating engine (i think it's called) at work, also I havent found one that I like.
CSS: Trying to apply CSS to Angular Bootrap Components. Everything has a shadow dom + a lot of things are ! important for some fucking reason. -
How can I, in JS, make sure a class (Vue) is instanciated only after a certain element is inserted into the DOM?
Currently, things are executed in this order:
1. Create modal
2. Append my-element to modal
3. Show modal
4. Instanciate Class (Vue)
Gives me "Vue cannot find my-element".
However, it works if I instanciate Vue in the console after modal is visible.4 -
It should be at night (after 9/10pm; I work better at night anyway), headphones on, music blasting (heavy metal nowadays), alone, preferably no distractions, but now that I am at home for xmas holidays I have to be on the lookout for my parents calling me. When I go back to uni I can eliminate that variable from this equation and so I should be in the zone for longer. Hopefully 😅
-
[Tied to my latest rant]
My parents asking me to help them with their computers is the same thing as if I asked my mom to tour me on a country she doesn't know anything about or if I asked my dad to teach me how to pilot a plane (my mom is a tour guide and my dad a driving instructor. I believe the only thing he can't teach is actually how to pilot a plane :b): sometimes it takes too much time and effort and you can't do it. -
!rant
Once I was in a programming class, and the teacher was explaining the subject for the class, and this guy asks something (about using an else after an if condition, because of efficiency, I think) and he replies with something like "yeah, you know, I like to live dangerous". I kid you not (yes, he said DANGEROUS instead of DANGEROUSLY). I had to try not to laugh out loud. -
JS: adding new dom nodes by adding html markup to the innerHTML property as string...
It's either dumb or a genius move.9 -
so my friend got told he had to stay after school for math every day he had math to catch up on work but this idiotic teacher told him he had to stay every tuesday and thursday...the only days this week he didnt have math class, yeah our school system sucks
-
Im doing a project for science as what would happen if a person went on an anorexic diet for a month suddenly.3
-
So I'm working on this little personal project (also as a way to keep my "skills" sharpened for the coming semester), that first started as a workaround to do this other thing, and I wanted to develop it and make it a full fledged thing, with a GUI (or something that resembles it, I don't know how to make GUIs yet, and IDK why is it a 3rd grade thing) and all instead of existing just in the IDE's terminal. When it was on the workaround stage it was just this ugly monster, with only 2 things one could do, but it worked. Now I'm going for a more polished thing and it's starting to break on me, and in places I didn't expect it to LoL
It's like I'm on a boat and I'm getting leaks from everywhere. Arr gotta get me a bucket and save me boat from sinking -
Can you even call yourself a frontend dev when you betray your backend mindset by prefering JS over CSS and JSX over HTML + DOM API?3
-
Say a JS 'widget' is embedded inside a domain abc.com
the widget's content is retrieved from xyz.com (API?), the API also returns a custom URL (think of it as a tracker) that the JS adds to the DOM of abc.com, inside an iFrame.
Essentially making this iFrame hosting xyz.com content/page while existing in abc.com domain
Now this iFrame's page makes its own requests to 3rd party sites, would that mean the 3rd party would see the request originating from xyz.com (iFrame page) or abc.com (the site hosting the iFrame)?9 -
THIS is powering the internet:
"[...] was a protocol number, similar to the third argument to socket today. Specifying this structure was the only way to specify the protocol family. Therefore, in this early system the PF_ values were used as structure tags to specify the protocol family in the sockproto structure, and the AF values were used as structure tags to specify the address family in the socket address structures. The sockproto structure is still in 44BSD (pp. 626-627 of TCPv2) but is only used internally by the kernel. The original definition had the comment "protocol family" for the sp_family member, but this has been changed to "address family" in the 4.4BSD source code. To confuse this difference between the AF_ and PF_ constants even more, the Berkeley kernel data structure that contains the value that is compared to the first argument to socket (the dom family member of the domain structure, p. 187 of TCPv2) has the comment that it contains an AF_ value. But some of the domain structures within the kernel are initialized to the corresponding AF value (p. 192 of TCPv2) while others are initialized to the PF value." Richard Stevens 'Unix network programming' -
I just found out that Discord disables right click. FUCK DISCORD. Not like I can't still inspect element, it's just a lot fucking more inconvenient since I have to trudge through this mess of a DOM looking for it. Fuck whoever decided this was a good idea.9
-
Why on earth would you create an entire new HTMLImageElement in the javascript file just to get the width and height of an image and never render it to the DOM. FFS use MS Paint, 3D Paint or ANY OTHER IMAGE EDITING SOFTWARE to get the size.
Seriously you over engineered the shit out of the easiest const you'll ever write in JavaScript.
And for the record, the width and height of the image used are only used in formulas which produce the actual width and height of the mock buttons that get drawn onto the canvas element. And don't worry, the click event handler for these mock buttons is actually the click event handler for the canvas...which checks the coordinates of where the click was made on the canvas. And if the click is over where the button is drawn in, congrats you clicked the button. -
Many people seem to hate jQuery and want to do stuff in some library's way, and I'm here like... What? jQuery is a perfect way of doing things like DOM manipulation, when everyone comes along with their libs, they will only exist for 1 microsecond before it gets abandoned, while jQuery has been around for YEARS and it still works the way it first has been
I don't get the appeal for new JS libs and hate for jQuery, at this point I'm suprised its included in standard browser contexts2 -
Is there anybody out there who likes Funcional programing, does frontend but feels like Single page application is not often needed ? what do you use to make dynamic parts with ? callbag ? direct dom manipulation ? alpinejs ?12
-
Anybody know how I could make an RxJS observable without RxJS?
I'm working on a library and I need it to be small (So including RxJS isn't really viable), run in the browser (IDK if Browserify will work for RxJS), and be fast. I need a way for a given element to 'listen' (or in RxJS terms, 'subscribe') to a value and update its text content whenever the value changes.
My current implementation is just a interval loop that checks if the previous value is the same as the current one, and if it isn't, it modifies the DOM.6 -
You have a revolver that when you shoot somebody on your tv/pc they die in real life, but since its a revolver you only have 6 shots, who do you shoot.7
-
i want to be a js guy and work for either personal clients or maybe a company, what do i need to focus on javascript? is it more on dom manipulation or math logics? just need an idea what the majority of js devs out there are doing on a day day basis18
-
Hope you are washing your hands, now that we are quarantined i can spend more time learning different programming languages, i need it because i have a group of friends making a game, say hi to vindic because he is one of our scripters and the only one to have devrant
-
Typical attempt to automate an annoying task, overengeneering more and more for hours, just to find out, that an iframe is blocking my way while searching the DOM. The iframe doesn't show me his descendants (did some research on that), hence the element I'm looking for cannot be queried, which was a main goal.
Great... -
i hate it when Im coding and my friends joke around and call me a hacker or nerd when they couldn't even print anything if i told them how to do it plus its not hacking if you believe its hacking when im typing code on python or c# online then you need to go back to school6