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 - "lazy loading"
-
Me: "I'm a programmer"
Others: talks about linux
Others: search algorithms!
Others: service infrastructure
Others: memory optimization
Others: encryption
Me: "I'm a front end web developer"
Others: complex services
Others: strong user form validation
Others: lazy loading
Others: SEO
Me: "fucking, I make shit look pretty alright"11 -
My JS function is now lazy loading, expressive, and uses 12 fewer lines of code! 😃
It no longer works, but
... no one is perfect. 😅3 -
Hey guys!
Been away for some time. Didn't have anything to tell tbh - until today.
As you may remember I started a new apprenticeship at big (and super cool) company. We develop software for various platforms.
I'm currently working on a plugin displaying some weatherdata. This plugin is supposed to be in 2 of our products. One is pretty nice but a pain in the ass to compile. The second one is a pure WTF. It's a web app with approximately half the functionality but 5x loading time (without demo data!) of the other product.
Well, today I learned why we have this loading time. They use I don't know how much different js frameworks and libraries for every single simple task. "It's easy and Facebook does it too. Besides that why are there frameworks if you could do it native?" HMMM LET ME GUESS BECAUSE SOME PEOPLE ARE FUCKING LAZY!?
Why do you need MULTIPLE frameworks for a simple web display!?3 -
"The logo and pictures are taking time to load, can you please look into it?"
That's the whole point of lazy loading you fucking moron.3 -
Don't waste your time - they said.
Use Spring - the good ol' framework - they said
It's not slow - they said
me: ignores them, builds a custom jetty-based webserver with the same functionality Spring+tomcat can offer (mappings, routings, etc).
My app: boots up completely in <300ms, while Spring tutorials say a hello-world app takes 3+ seconds to spin-up http://websystique.com/spring-boot/...
me: already set for deployment in lambda. I bet I can tune it up even further with lazy-loading if I really have to...
Moral of the story: sometimes bare-bones solution is a better choice: more performant, more extendable, more testable, more lightweight.
That, dear folks, is the classic LESS IS MORE :)12 -
Mixing lazy loading with event-based code == events won't be handled because the class won't subscribe to events until it's initialized hours after startup
Thank you, my dear lazy-loading lover, who keeps introducing hard-to-spot bugs everywhere. I wish your hand was as lazy as your code, that would have saved hours of debugging time. -
Whelp. I started making a very simple website with a single-page design, which I intended to use for managing my own personal knowledge on a particular subject matter, with some basic categorization features and a simple rich text editor for entering data. Partly as an exercise in web development, and partly due to not being happy with existing options out there. All was going well...
...and then feature creep happened. Now I have implemented support for multiple users with different access levels; user profiles; encrypted login system (and encrypted cookies that contain no sensitive data lol) and session handling according to (perceived) best practices; secure password recovery; user-management interface for admins; public, private and group-based sections with multiple categories and posts in each category that can be sorted by sort order value or drag and drop; custom user-created groups where they can give other users access to their sections; notifications; context menus for everything; post & user flagging system, moderation queue and support system; post revisions with comparison between different revisions; support for mobile devices and touch/swipe gestures to open/close menus or navigate between posts; easily extendible css themes with two different dark themes and one ugly as heck light theme; lazy loading of images in posts that won't load until you actually open them; auto-saving of posts in case of browser crash or accidental navigation away from page; plus various other small stuff like syntax highlighting for code, internal post linking, favouriting of posts, free-text filter, no-javascript mode, invitation system, secure (yeah right) image uploading, post-locking...
On my TODO-list: Comment and/or upvote system, spoiler tag, GDPR compliance (if I ever launch it haha), data-limits, a simple user action log for admins/moderators, overall improved security measures, refactor various controllers, clean up the code...
It STILL uses a single-page design, and the amount of feature requests (and bugs) added to my Trello board increases exponentially with every passing week. No other living person has seen the website yet, and at the pace I'm going, humanity will have gone through at least one major extinction event before I consider it "done" enough to show anyone.
help4 -
[vent]
I am java dev with 5 yoe at a place which has really good engineering talent.
Was assigned a feature request.
Feature request requires me and one more older dev(in age, not in exp at company) to write the code. My piece is really super complex because of the nature of the problem and involves caching, lazy loading and tonne of other optimization. Naturally it makes up 90% of the tasks in the feature request. On the other hand, the older dev simply has to write a select query (infact he only needs to call it since a function is already written).
Older dev takes up all the credit, gives the demo, knows nothing but wrongly answers in meetings with higher ups and was recently awarded employee of qtr.
It looks as if I do the easy work whereas he is the one pulling in all the hard work.
Need advice to justify my work and make others realise it's significance, nuances of area and complexity of it.
Do not expect monetary benefits, just expect credit and recognition for the worth of work I am doing.14 -
It sometimes really sucks to see how many developers, mostly even much better than me, are too lazy to implement a function to its full UX finish.
Like how can you not implement pagination if you know there's going to be fuck ton of content, how can you not allow deleting entries, how can there be no proper search of content, but instead some google custom search, how can you not implement infinite loading everywhere, but only in parts of your application, how can you not caching a rendered version or improve the page, that loads EVERY SINGLE ENTRY in your database with 11k entries, by just adding a filter and loading only chunks of it.
I know sometimes you need to cut corners, but there's rarely any excuse with modern toolsets to just write 3 lines more and have it ready for such basic things.
I sometimes just wake up during the night or before falling asleep and think "oh, what if in the future he might want to manage that, it's just another view and another function handling a resource, laravel makes that very easy anyway", write in on my list and do it in a blink the next day, if there's nothing else like a major bug.
I have such high standard of delivery for myself, that it feels so weird, how somebody can just deliver such a shitty codebase (e.g. filled with "quick/temporary implementations"), not think of the future of the application or the complete user and or admin experience.
Especially it almost hurts seeing somebody so much more versatile in so many areas than me do it, like you perfectly fine know how to cache it in redis, you probably know a fuck ton of other ways I don't even know of yet to do it, yet you decide to make it such a fucking piece of shit and call it finished.2 -
Why the fuck nobody talks about Multi-page apps?! We went from a Web where everything was Multi-page server-rendered, and now everything for Web developers is "Single-page apps".
What about websites who can't do that? Not everything can be a single-page app. Only my uncle's restaurant website, or something which is TRULY a full app. No half choices.
If your website is a multi-page app/portal which actually PRELOADS data, instead of doing 100 fetch to an API within a page that is full of loading bars, well, your life is a pain.
When you want a first contentful paint which isn't a white page, well, your life is a pain.
What are React, Vue, Ember, Angular (let's exclude Svelte and Marko) going to do about Multi-page apps and SSR?
React-router sucks to me. It's performance is weak and it's useful only when you have an SPA with multiple sections which can be treated as pages (e.g. A single SPA divided in tabs).
Server-side rendering is the worst pain ever made by humanity, in React (and prob Vue, I didn't try but I can bet). And even when made easier from libs like Svelte and Marko, I (personally) can't get it to be faster enough compared to a traditional website without a JS framework and with a templating engine.
Anyways, if there's anything that I learnt from React, is to stay away from Next.js. Perfect, beautiful, mess.
All JS frameworks just seem to bloat the code and make it worse and slower, even though they're REALLY helpful.
Why? Why everyone loves them if their downsides are so clear? Why 3 projects out of 3 I made (1 React SSR, 1 Vue, 1 Marko SSR) are and will stay painfully slow and bloated, full of shit, even if in 2020 we should have evolved with the famous three shaking, with the famous lazy loading, etc.?
I am just frustrated.
And let's not even talk about Webpack, Rollup, Lasso, those module bundlers shit which are harder to configure and understand than finding a needle in a haystack.
Lasso was the easiest to configure but I anyways can't understand it. Webpack seems it was made to handle SPAs, as any tool in this freaking world, and not even considering an easy way to integrate multiple bundles for multiple pages (I know it's pretty easy, but with component sharing between pages and big unique bundles Next.js handles it soooo bad it feels like hell).
Am I the only one?
Sorry for the long rant. I just needed to rant right now.17 -
I built a view engine that relied on V8 for expression evaluation and flow. Not very stable of course, since it used RegEx, but it worked fine for what it was designed for.
The crown feature was the ability to pass in lazy-evaluated huge objects to that view model, so that the view model decided what was going to be used in order to display the view. Made it really flexible, while not sacrificing speed.
I was brainstorming for 2 days about the lazy loading part, and the gymnastics that had to be implemented for this to work.
After I wrote my final line of code and thought that this is it, I launched it, and it FUCKING WORKED! First try!
I was hyperventilating, walking around the apartment like crazy, doing random push-ups just to try to utilize some energy that I felt was fighting to burst out like a xenomorph out of the chest.
... 2 weeks later I found bugs. Had to re-learn how I did it. It's true what they say: if it was hard to write, it's even harder to debug. Fixed it eventually, but that part's not that exciting. -
Any Angular devs in the house?
Does anyone know how angular lazy loading and webpack are related specifically? Struggling to find a straight forward answer.1 -
Why would smn want to use Angular for their project? Its a mess! Its bloated, abstracted, opinionated and so not dev friendly. Its been more than 2 weeks I have been working on AoT and Lazy loading. Dont even get me started on NgModule! Its irritatingly convoluted yet people seem to prefer it. Why? Am I the only one who thinks this way?!?5
-
Here is my GitHub repository where I demonstrated
1. Role Based Authentication with fake jwt and mocked backend.
2. Lazy loading and eager loading modules.
3. Data Resolvers.
4. A pretty good project structure.
Each different topic is implemented in a different branch. I just wanted to share it here.
I have also provided links to the online resources where I learned or practiced these things in Angular ( Check Readme file for more info) :)
Feel free to check.
https://github.com/Ahsan9981/...4 -
So my boss tells me that industry standard for serving images is that you have one image on the server that is approximately 3x larger than the largest size you need it to be and resize it on the client side as you need. However, a lot of the tutorials I have seen online lead me to believe that is not true. Is it? Because I have to serve up a whole lot of 150kb images for something I didn't even want to do in the first place and it's causing serious performance issues, even with lazy loading.5
-
I'll need to do a survey on how different frontend frameworks support asynchrony, both in data and component loading.
I have a very powerful lazy loading primitive for React (https://github.com/lbfalvy/... ), but it's a bit broken so I'm rewriting it into a stateful TS class (because it would have to allocate a lot to be immutable and fast) and a React shim. I'm considering adapting it to other frameworks that struggle with code splitting or async data, or perhaps - like react - only ship a built-in solution that requires unrelated business logic to acknowledge the frontend framework.
Are you happy with the workflow of using asynchronously loaded data in your frontend framework of choice?1 -
Modern Web Developer
(To the tune of "I Am the Very Model of a Modern Major-General" from Gilbert and Sullivan's "The Pirates of Penzance")
I am the very model of a modern web developer
I’m quite fluent with JavaScript; An HTML whisperer
My code is clean and elegant, I genuinely innovate
And even know my way around a Promise and async / await
I’m very well acquainted too with matters vector graphical
I understand why SVG coordinates seem magical
And even without Photoshop I elegantly can produce
A mockup or a logo in most any format that you choose
[Chorus]
A mockup or a logo in most any format that you choose
A mockup or a logo in most any format that you choose
A mockup or a logo in most any format that you choose
I'm quite adept at ES6 expressions like destructuring
I know the ins and outs of functional reactive programming
In short, in matters browser-based or Node.js if you prefer
I am the very model of a modern web developer
[Chorus]
He is the very model of a modern web developer
I know our mythic history, the humble start, the browser wars
I know why Douglas Crockford fought the battle over ES4
The World Wide Web Consortium and Ecma International
My knowledge of our legacy is truly supernatural
With LESS and SASS and CSS, designing for mobility
I’ll perfectly apply the right amount of specificity
From custom fonts and parallax to grid and flex and border-box
I know most every tip and trick both common and unorthodox
[Chorus]
He knows most every tip and trick both common and unorthodox
He knows most every tip and trick both common and unorthodox
He knows most every tip and trick both common and unorthodox
And when it comes to lazy loading, bundling up and splitting code
There’s nothing quite like Webpack, which of course is built on top of Node
Considering my resume, I’m certain that you will concur
I am the very model of a modern web developer
[Chorus]
He is the very model of a modern web developer
When new frameworks and libraries emerge I must be ravenous
And gobble up the hot new thing, my appetite is bottomless
React and Vue and Angular, Immutable, RxJS
The list will be outdated long before I'm finished singing this
My pull requests rely on multitudinous utilities
To help me lint and test and build, a deluge of analyses
And every single day there are a hundred thousand more to learn
The web is going through an irresponsible amount of churn
[Chorus]
The web is going through an irresponsible amount of churn
The web is going through an irresponsible amount of churn
The web is going through an irresponsible amount of churn
This pace is agonizing! Code from yesterday is obsolete!
The speed of innovation is enough to knock me off my feet!
It's happening too fast! I can’t keep up! I’m tired! It’s all a blur!
I am the very model of a modern web developer!
[Chorus]
He is the very model of a modern web developer!1 -
YAYYY! I MADE IT!!
After several nights of playing with my new and very first custom mechanical keyboard, at last I could successfully get my long-time-dreaming keyboard!
I read the guilds, tutorials, even youtube videos to get walked through the process:
- I started with building my own layout on different websites, since they said that it would be easier to use online tools than to write codes by yourself in order to build your own keymappings, but the UI/UX of the first one I tried was so bad that it took me a great deal of time to understand how to use it and working on it is even more time consuming. Later I found another webpage which was less recommended, but could help me to do that a lot easier.
- Then, the result was compiled to a firmware file, which would be flashed into the kb's controller. Loading the file into the board was also tiring and got me exhausted totally! I tried all the "lazy" recommended ways (using Windows softwares) but received the same error all the time. When I almost lost all the hopes, I'd come to the least recommended way: typing a few command lines on Linux. And it worked! The keyboard just do what I want it to do miraculously.
What I learnt: never do complicated things on Windows, because they are suuuuuper simple on Linux!
P/S: Sorry for the bad lighting in my room and the tiny spacebar (the spacebar size is 7u which I don't have one right now). I just need a beautiful keycap set to make it perfect.5 -
Illusion of interactivity: switching back to a tab with an open google document in google docs, I see a cursor, but it's not yet accepting input, only after I click anywhere inside the document. Might be due to lazy loading browsers tabs, but anyway this is irritating.1
-
Anyone have some good books or websites on different types of resource-fetching (lazy-loading, eager loading, explicit loading, etc...)? I'm refactoring an API wrapper and i cant seem to figure out what i want to do with the API... It's extremely slow and unreliable, however i have to use it.2