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 - "gradient"
-
I'm a self-taught 19-year-old programmer. Coding since 10, dropped out of high-school and got fist job at 15.
In the the early days I was extremely passionate, learning SICP, Algorithms, doing Haskell, C/C++, Rust, Assembly, writing toy compilers/interpreters, tweaking Gentoo/Arch. Even got a lambda tattoo on my arm after learning lambda-calculus and church numerals.
My first job - a company which raised $100,000 on kickstarter. The CEO was a dumb millionaire hippie, who was bored with his money, so he wanted to run a company even though he had no idea what he was doing. He used to talk about how he build our product, even tho he had 0 technical knowledge whatsoever. He was on news a few times which was pretty cringeworthy. The company had only 1 programmer (other than me) who was pretty decent.
We shipped the project, but soon we burned through kickstart money and the sales dried off. Instead of trying to aquire customers (or abandoning the project), boss kept looking for investors, which kept us afloat for an extra year.
Eventually the money dried up, and instead of closing gates, boss decreased our paychecks without our knowledge. He also converted us from full-time employees to "contractors" (also without our knowledge) so he wouldn't have to pay taxes for us. My paycheck decreased by 40% by I still stayed.
One day, I was trying to burn a USB drive, and I did "dd of=/dev/sda" instead of sdb, therefore wiping out our development server. They asked me to stay at company, but I turned in my resignation letter the next day (my highest ever post on reddit was in /r/TIFU).
Next, I found a job at a "finance" company. $50k/year as a 18-year-old. CEO was a good-looking smooth-talker who made few million bucks talking old people into giving him their retirement money.
He claimed he changed his ways, and was now trying to help average folks save money. So far I've been here 8 month and I do not see that happening. He forces me to do sketchy shit, that clearly doesn't have clients best interests in mind.
I am the only developer, and I quickly became a back-end and front-end ninja.
I switched the company infrastructure from shitty drag+drop website builder, WordPress and shitty Excel macros into a beautiful custom-written python back-end.
Little did I know, this company doesn't need a real programmer. I don't have clear requirements, I get unrealistic deadlines, and boss is too busy to even communicate what he wants from me.
Eventually I sold my soul. I switched parts of it to WordPress, because I was not given enough time to write custom code properly.
For latest project, I switched from using custom React/Material/Sass to using drag+drop TypeForms for surveys.
I used to be an extremist FLOSS Richard Stallman fanboy, but eventually I traded my morals, dreams and ideals for a paycheck. Hey, $50k is not bad, so maybe I shouldn't be complaining? :(
I got addicted to pot for 2 years. Recently I've gotten arrested, and it is honestly one of the best things that ever happened to me. Before I got arrested, I did some freelancing for a mugshot website. In un-related news, my mugshot dissapeared.
I have been sober for 2 month now, and my brain is finally coming back.
I know average developer hits a wall at around $80k, and then you have to either move into management or have your own business.
After getting sober, I realized that money isn't going to make me happy, and I don't want to manage people. I'm an old-school neck-beard hacker. My true passion is mathematics and physics. I don't want to glue bullshit libraries together.
I want to write real code, trace kernel bugs, optimize compilers. Albeit, I was boring in the wrong generation.
I've started studying real analysis, brushing up differential equations, and now trying to tackle machine learning and Neural Networks, and understanding the juicy math behind gradient descent.
I don't know what my plan is for the future, but I'll figure it out as long as I have my brain. Maybe I will continue making shitty forms and collect paycheck, while studying mathematics. Maybe I will figure out something else.
But I can't just let my brain rot while chasing money and impressing dumb bosses. If I wait until I get rich to do things I love, my brain will be too far gone at that point. I can't just sell myself out. I'm coming back to my roots.
I still feel like after experiencing industry and pot, I'm a shittier developer than I was at age 15. But my passion is slowly coming back.
Any suggestions from wise ol' neckbeards on how to proceed?32 -
Please. Hear me out.
I've been doing frontend for six years already. I've been a junior dev, then in was all up to the CTO. I've worked for very small companies. Also, for the very large ones. Then, for huge enterprises. And also for startups. I've been developing for IE5.5, just for fun. I've done all kinds of stuff — accessibility, responsive design (with or without breakpoints), web components, workers, PWA, I've used frameworks from Backbone to React. My favourite language is CSS, and you probably know it. The bottom line is, you name it — I did it.
And, I want to say that Safari is a very good browser.
It's very fast. Especially on M1 Macs. Yes, it lacks customization and flexibility of Firefox, but general people, not developers, like to use it. Also, Safari is very important — Apple is a huge opposing force to Google when it comes to web standards. When Google pushes their BS like banning ad blockers, Apple never moves an inch. If we lose Safari, you'll notice.
As for the Safari-specific bugs situation, well… To me, Safari serves as a very good indicator: if your website breaks in Safari, chances are you used some hacks that are no good. Safari is a good litmus test I use to find the parts of my code that could've been better.
The only Safari-specific BUG I encountered was a blurry black segment in linear gradients that go from opaque to transparent. So, instead of linear-gradient(#f00, transparent), just do linear-gradient(#f00f, #f000).
This is the ONLY bug I encountered. Every single time my website broke in Safari other than that, was for some ugly hack I used.
You don't have to love it. I don't even use it, my browser of choice is Firefox. But, I'm grateful to Safari, just because it exists. Why? Well, if Safari ceases to exist, Google will just leave both W3C and WhatWG, and declare they'll be doing things their way from now on. Obey or die.
Firefox alone is just not big enough. But, together with Safari, they oppose Google's tyranny in web standards game.
Google will declare the victory and will turn the web into an authoritarian dictatorship. No ad blockers will be allowed. You won't be able to block Google's trackers. Google already owns the internet, well, almost, and this will be their final, devastating victory.
But Safari is the atlas that keeps the web from destruction.22 -
I'M BACK TO MY WEBDEV ADVENTURES GUYS! IT TOOK ME LIKE 4 MONTHS TO STOP BEING SO FUCKING DEPRESSED SO I CAN ACTUALLY STAND TO WORK ON IT AGAIN
I learned that the linear gradient looks cool as FUCK. Honestly not too fond of the colors I have right now, but I just wanted to have something there cause I can change it later. The page has evolved a bunch from my original concept.
My original concept was the bar in the middle just being a URL bar and having links on the sides. If I had kept that, it would have taken me a few hours to get done. But as time went on when I was working on it, my idea kept changing. Added the weather (had a forecast for a while but the code was gross and I never looked at the next days anyways, so I got rid of it and kept the current data). I wanted to attempt an RSS reader, but yesterday I was about to start writing the JavaScript to parse the feeds, then decided "nah", ended up making the space into a todo list.
The URL bar changed into a full command bar (writing the functions for the commands now, also used to config smaller things, such as the user@hostname part, maybe colors, weather data for city and API key, etc)....also it can open URLs and subreddits (that part works flawlessly). The bar uses a regex to detect if it's a legit URL (even added shit so I don't need http:// or https://), and if it's not, just search using duckduckgo (maybe I'll add a config option there too for search engines).
At this very moment it doesn't even take a second to fully load. It fetches weather data from openweathermap, parses it, and displays it, then displays the "user" name grabbing a localstorage value.
I'm considering adding a sidebar with links (configurable obviously, I want everything to be dynamic, so someone else could use my page if they wanted), but I'm not too sure about it.
It's not on git yet because I was waiting until I get some shit finished today before I commit. From the picture, I want to know if anyone has any suggestions for it. Also note that I am NOT a designer. I can't design for shit.12 -
#sky {
background: linear-gradient(rgb(134, 167, 225) 71% , rgb(230, 144, 101));
}
-- commited by ADM3 -
Quarantine and unemployment gave me opportunities to do side projects, here is another one I’ve done recently and I think you guys will like it
It is an image mosaic that preserves features based on color gradient, and tries to use as many photos as possible instead of just repeatedly using same picture over and over.
Here is the link: https://github.com/txstc55/...
For those who care about my minesweeper game, I’m working on submitting it to steam and make it a free game.2 -
I'VE BEEN PLAYING WITH CSS SOME, AND I FOUND OUT ABOUT THE LINEAR-GRADIENT THING
IT IS SO FUCKING COOL GUYS1 -
A rant about pretentious people:
So last week I walk into college and I find that a new "Machine Learning Crash Course" is being offered by a senior. Now I'm a beginner in this domain, and know the just basic concepts and math behind it. Naturally, I was super curious about this and decided to talk the student who was supposed to teach the course.
I asked him where he learned from, and mentioned that I'm an interested beginner. He just replied, "YouTube".
Okaaaaayyy?
Now I'm suspicious of this guy, so I asked him if he's worked on any related projects I could look into, to which he replies, "Not yet, but I'm working on some".
Now I'm SUPER suspicious. A guy that's got no experience with the subject, yet is teaching others about it?
Get this, at this point he rudely asks me if I have anything else to say. So I asked him a super simple question: "Do you know what gradient descent is?". He replies "Uhh, no, but I've heard about it".
I lost it.
HOW DID THIS GUY MANAGE TO CONVINCE THE HEAD OF THE DEPARTMENT AND SEVERAL OTHER PROFESSORS TO TEACH A MACHINE LEARNING CRASH COURSE?
People like him need to go away.
/rant4 -
TL;DR: Printers suck. MS-Word sucks.
Yesterday I wanted to print a few participation certificates for my blender project students.
*Turns on printer, runs downstairs, gets paper, runs upstairs, puts paper in*
So I tried to print in word. Nothing happened. Printer was online. I checked queue: Nothing.
*a couple of tries later*
Okay, fuck it! I export it as a pdf and open it in edge (8 times. 8 documents. Edge is a neat pdf-viewer, fight me). I press print on one. It works. I print the others and check: They look shit. The images look like 25% resolution and 50% jpg compression. I check word.
It by default exports in low quality. Yea, thanks for asking me. I export pdfs again and check "high quality". Open them, print. Done.
These were like 30 wasted minutes and print color. And paper.
Btw they look fucking neat. I can't show them right now but gradient text headline, project name is a rendered and edited 3D object :D4 -
Static HTML pages are better than "web apps".
Static HTML pages are more lightweight and destroy "web apps" in performance, and also have superior compatibility. I see pretty much no benefit in a "web app" over a static HTML page. "Web apps" appear like an overhyped trend that is empty inside.
During my web browsing experience, static HTML pages have consistently loaded faster and more reliably, since the browser is immediately served with content useful for consumption, whereas on JavaScript-based web "apps", the useful content comes in **last**, after the browser has worked its way through a pile of script.
For example, an average-sized Wikipedia article (30 KB wikitext) appears on screen in roughly two seconds, since MediaWiki uses static HTML. Everipedia, in comparison, is a ReactJS app. Guess how long that one needs. Upwards of three times as long!
Making a page JavaScript-based also makes it fragile. If an exception occurs in the JavaScript, the user might end up with a blank page or an endless splash screen, whereas static HTML-based pages still show useful content.
The legacy (2014-2020) HTML-based Twitter.com loaded a user profile in under four seconds. The new react-based web app not only takes twice as long, but sometimes fails to load at all, showing the error "Oops something went wrong! But don't fret – it's not your fault." to be displayed. This could not happen on a static HTML page.
The new JavaScript-based "polymer" YouTube front end that is default since August 2017 also loads slower. While the earlier HTML-based one was already playing the video, the new one has just reached its oh-so-fancy skeleton screen.
It would once have been unthinkable to have a website that does not work at all without JavaScript, but now, pretty much all popular social media sites are JavaScript-dependent. The last time one could view Twitter without JavaScript and tweet from devices with non-sophisticated browsers like Nintendo 3DS was December 2020, when they got rid of the lightweight "M2" mobile website.
Sometimes, web developers break a site in older browser versions by using a JavaScript feature that they do not support, or using a dependency (like Plyr.js) that breaks the site. Static HTML is immune against this failure.
Static HTML pages also let users maximize speed and battery life by deactivating JavaScript. This obviously will disable more sophisticated site features, but the core part, the text, is ready for consumption.
Not to mention, single-page sites and fancy animations can be implemented with JavaScript on top of static HTML, as GitHub.com and the 2018 Reddit redesign do, and Twitter's 2014-2020 desktop front end did.
From the beginning, JavaScript was intended as a tool to complement, not to replace HTML and CSS. It appears to me that the sole "benefit" of having a "web app" is that it appears slightly more "modern" and distinguished from classic web sites due to use of splash screens and lack of the browser's loading animation when navigating, while having oh-so-fancy loading animations and skeleton screens inside the website. Sorry, I prefer seeing content quickly over the app-like appearance of fancy loading screens.
Arguably, another supposed benefit of "web apps" is that there is no blank page when navigating between pages, but in pretty much all major browsers of the last five years, the last page observably remains on screen until the next navigated page is rendered sufficiently for viewing. This is also known as "paint holding".
On any site, whenever I am greeted with content, I feel pleased. Whenever I am greeted with a loading animation, splash screen, or skeleton screen, be it ever so fancy (e.g. fading in an out, moving gradient waves), I think "do they really believe they make me like their site more due to their fancy loading screens?! I am not here for the loading screens!".
To make a page dependent on JavaScript and sacrifice lots of performance for a slight visual benefit does not seem worthed it.
Quote:
> "Yeah, but I'm building a webapp, not a website" - I hear this a lot and it isn't an excuse. I challenge you to define the difference between a webapp and a website that isn't just a vague list of best practices that "apps" are for some reason allowed to disregard. Jeremy Keith makes this point brilliantly.
>
> For example, is Wikipedia an app? What about when I edit an article? What about when I search for an article?
>
> Whether you label your web page as a "site", "app", "microsite", whatever, it doesn't make it exempt from accessibility, performance, browser support and so on.
>
> If you need to excuse yourself from progressive enhancement, you need a better excuse.
– Jake Archibald, 20139 -
css quick maffs
so, you want to make a css gradient from a certain color into transparent. The logical way would be doing it like this:
linear-gradient(#112233, transparent)
however, this will cause a blurred black stripe to appear in safari. This is due to safari-specific algorithms (that also make it the quickest browser, especially on arm-powered macs).
stackoverflow and other boubas will suggest doing this:
linear-gradient(#112233, rgba(255, 255, 255, 0))
this is better, but instead of a black stripe, a half-transparent white stripe will appear.
To finally make this gradient render consistently across different browsers, do this:
linear-gradient(#112233, #11223300)
Now, you're only changing alpha. See, CSS is a declarative language, so you should be telling it EXACTLY what you want to achieve. You don't want to change one color into another (in that case, "#112233" into "transparent", yes, they are distinct colors that are totally different. CSS doesn't treat "transparent" in some special way like we do) but to only change the alpha channel of #112233.
Feel free to use rgba notation if you want to support older browsers:
linear-gradient(rgba(11, 12, 13, 1), rgba(11, 12, 13, 0))
aight bye2 -
Designer: We need gradients and curved UI elements to make our product look modern.
- Codes over a month to support that.
Client: yeah gradients don't go with our branding and could you remove those curves!
FML4 -
I want to write something in PHP.
Yes, coming from me, it sounds like stockholm syndrome, but for me PHP is reminiscent of simpler times.
I want to get a server right where I bought the domain, with CPanel, log in with FTP and ~~push~~ (excuse me, _send_) index.php and other files there. I want to open phpmyadmin and throw some stupid fields together that won't work at scale, but "scale" will never happen.
I want to design websites without normalize.css, without any kind of javascript but some silly UI stuff, I want to send emails with sendmail and not sendgrid. I want my gradient buttons back.
Symphony and Laravel can kiss my ass.9 -
What's everyone's opinion when it comes to designing modern and/or minimalistic interfaces when using blur or gradients?
I see a lot of people who are hating blur used in UI elements and a lot of people praise the 'death' of gradients, what's everyone else think of these.
I personally love using blur in UI's and do like gradients if done correctly (not 2 colour gradients)
EDIT: I mean what's your opinion on blur and gradients not which one is better :-P12 -
There is a drawing competition for my currently most played game.
I'm on vacation and the deadline is when I get back. So what did I do?
I made an inspiration cluster with the character and drawings having this arrogant face (laptop, gimp).
I sketched on my phone and put it on my laptop (the sketch). I have no desk here so I'm drawing on my bed. I have no drawing pad so I'm drawing with my mouse. Then I draw it in gimp with colors and everything (the stroke in another program on my gfs laptop), put each layer in inkscape to svg-ify them and to hq-render them back in Gimp. Corrected a few things in Gimp. Added more detail, effects (glow, gradient instead of flat color ...).
~6 hours over two days. That was fun. And fucking unprofessional.7 -
I just spent 4 (four) hours debugging why my perlin noise used the same gradient for every point. Turns out I forgot to assign the seed for the random generator so it defaulted to 0. (I seed it every round with the map seed and coordinates so I don't have to store anything for visited regions)
So, how's your sunday night going? -
Sharing a first look at a prototype Web Components library I am working on for "fun"
TL;DR left side is pivot (grouped) table, right side is declarative code for it (Everything except the custom formatting is done declaratively, but has the option to be imperative as well).
====
TL;DR (Too long, did read):
I'm challenging myself to be creative with the cool new things that browsers offer us. Lani so far has a focus on extreme extensibility, abstraction from dependencies, and optional declarative style.
It's also going to be a micro CSS framework, but that's taking the back-seat.
I wanted to highlight my design here with this table, and the code that is written to produce this result.
First, you can see that the <lani-table> element is reading template, data, and layout information from its child elements. Besides the custom highlighting code (Yellow background in the "Tags" column, and green gradient in the "Score" column), everything can be done without opening even a single script tag.
The <lani-data-source> element is rather special. It's an abstraction of any data source, and you, as a developer can add custom data sources and hook up the handlers to your whim (the element itself uses the "type" attribute to choose a handler. In this case, the handler is "download" which simply sends a fetch request to the server once and downloads the result to memory).
Templates are stored in an html file, not string literals (Which I think really fucks the code) and loaded async, then cached into an object (so that the network tab doesn't get crowded, even if we can count on the HTTP cache). This also has the benefit of allowing me to parse the HTML templates once and then caching the parsed result in memory, so templates are never re-parsed from string no matter how many custom elements are created.
Everything is "compiled" into a single, minified .js file that you include on your page.
I know it's nothing extraordinary, but for something that doesn't need to be compiled, transpiled, packaged, shipped, and kissed goodnight, I think it's a really nice design and I hope to continue work on it and improve it over time1 -
2020 and Chrome has yet to decide upon a standard style for they inner form controls.
This is a date field with:
- a blue gradient "clear"
- a gray-bg spinner
- and a transparent bg calendar dropdown
2020!!!! I don't want to use huge date pickers anymore, Chrome!4 -
I finally got the lstm to a training and validation loss of < 0.05 for predicting the digits of a semiprime's factors.
I used selu activation with lecun normal initialization on a dense decoder, and compiled the model with Adam as the optimizer using mean squared error.
Selu is self-normalizing, meaning it tends to mean 0 and preserves a standard deviation of one, so it eliminates the exploding/vanishing gradient problem. And I can get away with this specifically because selu *only* works on dense layers.
I chose Adam, even though this isn't a spare problem, because Adam excels on noisy problems and non-stationary objectives (definitely this), and because adam typically doesn't require a lot of hyperparameter tuning its ideal here, especially considering because I don't know what the hyperparameters should be to begin with.
I did work out some general guidelines on training quantity vs validation, etc.
The initial set wasn't huge or anything, roughly 110k pairs for training.
It converged pretty quick all things considered, and to the low loss like I mentioned, but even then the system always outputs the same result, regardless of the input, so obviously I'm doing something incorrectly.
The effectiveness of this approach for training and validation makes me question if I haven't got something wildly wrong. Still exploring though and figuring out how to get my answers back out. I'm hoping I just fucked up the output, and not the input as well. -
So I've received a link to Figma for the new mobile app from our designer. It looks great and all but...
Each fucking piece of text is styled independently. Half of the cards in the layout are simple rounded rectangles, the other half are some components with a gradient. Icons are a mix of vector graphics and line elements. Even buttons aren't components. Consistence anyone? Please?
And now comes the best part. How am I even supposed to reach half of the screens? There are four variants of a screen with very similar functionality, but only a single button in the main screen which would at least remotely correspond to one of them. The guy who invented the wirescreens just kept adding things which would be nice to have in the final app, without revising it and making clear use case flows out of it?
After a few days of implementing this clusterfuck of a design, I have finally settled on a consistent set of font and element themes. Just please use components in Figma. You are paid to work in this tool which can make it super easy for the developer AND for you as well to make the design come to life, so why don't you learn to use it?
At least the designer is a nice guy, but god, could he learn to use his single tool?3 -
Does gradient descent in artificial neural networks apply the most changes closest to the input layer?6
-
The shaking animation of FilePond when an upload has failed is not "aesthetic". It just rubs the error into my face. I am already frustrated enough that the upload faaaaaaiiiled (each time when I read "failed" on a computer screen, it sounds like whining to me. Computer/Website: "I FAAAILLED😭😭😭😭😭" OH, CRY ME A _______ RIVER, YOU UTTER LOSER!!!! You are made to WORK, not to 😭F😭A😭I😭L😭. ).
FilePond is nice, but do you think your stupid "oh-so-aesthetic" shaking animation when an upload 😭😭😭FAAAAAAAAIIIIIIIIIILED😭😭😭 makes me happier? The red gradient at the top and the "Error during upload" text is enough. Two indicators of 😭f😭a😭i😭l😭u😭r😭e😭 already. But this shaking animation is one "straw too much on the camel's back".
Sorry for insincere language. I just had to get this off my chest unfiltered.2 -
Started to learn Reinforcement Leaning, from level 0: Atari Pong Game. Stopped and think a bit on the gradient calculation part of the blog.... hmm, I guess it's been almost a year since my Machine Learning basic course. Good thing is old memory eventually came back and everything starts to make sense again.
Wish me luck...
Following this blog:
https://karpathy.github.io/2016/05/...3 -
can you guys show me yours & your favorite personal websites?
i need mine to be unique and POP. right now mine has a linear gradient background that changes each time with javascript to look cool, but that's pretty much it. do you guys have any ideas?
i really want the user to be able to deepfake the picture of me in it by using their camera and tensorflow.js so that the picture will change to their facial expressions, but i'm not sure how to do that yet.32 -
Think of an awesome sounding AI project while not knowing a thing about AI.
Tell the guy you will be working with that you will manage to keep the learning pace up (he doesn't know AI as well, woah!)
Fast forward 2 weeks - completely forget about how I wanted to do anything with AI.
Fast forward 1 week - that guy messages me that we ought to do a meeting to check how much each of us have learned and to decide on how we will tackle the project.
Somehow managed to get the deadline to be day after tomorrow.
'I am screwed...' is what I think when I skim through pages of 'Artificial Intelligence a Modern Approach'. So, I put down the book and try to find something easy to understand on youtube. I find a hyperactive looking guy that under a video titled along the lines of '5mins and you are linear gradient pro'. Not suscipious at all.
Watched video twice, managed to understand that I need calculus for this shit. Oh well.
AI seems so much fun until you understand that it requires a fuckload of knowledge to do anything at all! :'(
Going to try to analyse linear gradient until tomorrow and hope that it will be sufficient for our project.
Lol. Who am I kidding? -
Just finished my finals.
Had to run k-means with pen and paper only. I find this kind of question stupid but why not. BUT WHY THE FUCK DID YOU CHOSE SOME INITIALIZATION THAT TAKES 13(!!!!) FUCKING ITERATIONS TO CONVERGE ? Just in case my first 12 iterations are correct by chance ? Guess what, you fucktard, I GOT IT.
And doing the same calculus by hand 13 FUCKING TIMES is moronic as hell, you retarded piece of shit ! When you train your neural networks, do you also backpropagate your gradient all by yourself, mongoloid baboon? Getting sick of those stupid assignements1 -
Use Linear gradient ...
No use rgba
Arghhhh...okay rgba looks OK...wait linear gradient is better...no wait
Hallelujah!!!!!2 -
Article about creating gradients programmatically.
FullHD png with gradient at the top...
Use fucking svg or at least webp! It's 2k17 already. -
So I'm sitting here reexamining the prototext file of the densenet model and i'm confused by what i'm seeing.
I realize its a fancy 'convolutional network' but how do you pretrain a model with what looks like a whollllleee bunch of complex programmatic procedures in between input and output ?
I thought each layer was just an activation code, bias and so many connected weights which act as coefficents to the last layers output ?
how is gradient descent performed where you have imaging procedures being performed ?1