• Breaking News

    Friday, April 30, 2021

    Understanding Big O Notation as a Software Developer web developers

    Understanding Big O Notation as a Software Developer web developers


    Understanding Big O Notation as a Software Developer

    Posted: 30 Apr 2021 07:15 AM PDT

    Why is it SO DANG HARD in ecommerce to get a fast mobile PageSpeed, and am I wasting my time trying to achieve a better time?

    Posted: 30 Apr 2021 07:53 AM PDT

    If there's one thing that makes me feel like an enormous loser, it's running Google PageSpeed scores on my website.

    For mobile, depending on how the test is feeling at a particular time, I'll get scores between 10 and 25 on mobile—and between 60-85 on desktop. Seeing myself so deep in the red makes me feel like a GIGANTIC fucking loser, and it makes me desperate to try to get rid of a bunch of shit on the site to achieve a faster score.

    It eats at me to the point where I consider eliminating functions on the site that add genuine, real value, just to get a PageSpeed boost. I've considered doing such hugely moronic things as: Getting rid of a reviews app (despite reviews being so critical in ecommerce); further compressing my already highly-compressed images to the point that they would be blurry and look like shit (on a site that sells wall art, no less); deactivating the "Buy Now" button that allows them to go straight to checkout; etc. Trying to improve the speed scores turns me into a huge dumbass basically, considering doing stupid stuff just to see that red turn orange.

    The thing is, when I test competitor sites in my same industry -- huge, behemoth companies that get tons of traffic and have huge budgets to improve their site speed -- their scores are shit too! Sites like iCanvas, GreatBigCanvas, even Amazon itself -- all of their mobile PageSpeeds are in the red too! Somewhere in the ballbark of between 20-30. All of them also FAIL the Google CoreVitals test on mobile.

    So when I see that, from such huge successful companies that have titanic budgets to spend on these things, it makes me think: Maybe I'm wasting my time and overthinking this? Maybe it's easy to get faster scores if you're just doing something basic like hosting blog articles, or having a landing page that describes attorney services and tries to get leads to book a call -- but a highly interactive product page for commercial sales of visual products like wall art? Maybe there's only so far you can push this--and chasing high mobile PageSpeed scores for such a site is like chasing a leprechaun at the end of the rainbow?

    Your thoughts on this? Specifically, how do you strike that tradeoff between: Having features & functions on your site that genuinely add value (yet increase page weight and cause load times to be delayed), vs. eliminating a bunch of stuff to boost load times (while simultaneously getting rid of features that add value)

    I see all the stats on how "X extra milliseconds in load time causes a Y percent drop in conversions", and I get that -- but then I see all these companies who are just flooded with customers *also* have shit load times, so maybe it's not where I should focus my energies on?

    This is something I truly struggle with, and I'll go through phases where I'm wearing my "increase page speed" hat and I'll maybe push it too far in one direction, then I'll go through another "add more functionality on the site" phase to where I'll do stuff that will decrease the load times.

    Any insight into how you think about this and balance these different factors would be much appreciated, because this really is something that frustrates me and makes me feel like a huge loser.

    Example product page of my site is --> https://nextlevelartwork.com/products/velociraptor-funny-classy-dinosaur-portrait-poster-or-canvas-art

    One thing I will note, despite whatever the almighty Google test tells me: My site doesn't feel slow when I use it, whether on mobile or desktop. Even after I completely clear my cache. To me, it feels reasonably smooth and fast. Maybe that first load, initial, cache-less load on mobile will take a little bit, product pages do take a few seconds to fully load everything to the point where scrolling & interactivity is 100% smoothly responsive, but it's not agonizing, and after that point, the rest of the site session feels pretty smooth. So maybe I'm overthinking this and putting too much stock into Google telling me I suck, vs what the actual felt user experience is.

    Thanks!

    submitted by /u/What_The_Hex
    [link] [comments]

    Safari and iOS Browser Monopoly: Progress Delayed Is Progress Denied

    Posted: 30 Apr 2021 01:40 PM PDT

    Lambda School lays off 65 employees amid restructuring - Nearly a year after its last layoff, online coding bootcamp Lambda School just announced more cuts amid a broader structuring. The roles that were cut span senior product, engineering, design, community management, or instructional staff

    Posted: 30 Apr 2021 07:04 AM PDT

    I'm developing an app using Angular, .NET Core, Entity Framework, and SQL Server for my bachelors' thesis. How can I host it on the internet?

    Posted: 30 Apr 2021 05:54 AM PDT

    So I need to develop a Reddit-like app for my bachelor thesis in 2 months maximum, and it will also have features like Image and Video Upload.

    I have some questions:

    1. What provider should I use to host my website given my tech stack?
    2. Should I have a third-party service for authorization and authentication like OAuth?
    3. From what I understood, for the Image and Video upload features, I need to upload the photos and videos on a cloud service and then add the path from the cloud in the database. Which service should I use and how can I configure it?
    4. Do I need to change SQL Server to another type of database in order to host it on the internet?
    5. It would be nice if I included an email service for account creation. Which one do you prefer?
    submitted by /u/FMLhehe
    [link] [comments]

    How I Booked My Absolutely Cheapest One-Month Trip Ever

    Posted: 30 Apr 2021 02:05 PM PDT

    displaying part of a web page you do not host

    Posted: 30 Apr 2021 12:55 PM PDT

    I have a merchant partner that I send traffic over for lead gen. The problem is, their page has too many links leading elsewhere and I want to keep people focused on completing the form. Is it possible to have a particular portion of a web page I do not host display?

    submitted by /u/JustJohn8
    [link] [comments]

    CSRF, CORS, and HTTP Security headers demystified

    Posted: 30 Apr 2021 02:56 AM PDT

    Netlify vs Hosting on Akamai CDN

    Posted: 30 Apr 2021 01:28 PM PDT

    Does anyone have experience with hosting their FE site on a CDN, such as Akamai? We currently use Netlify for hosting our site and have been pretty satisfied with it. The built-in CI and CDN are great. Akamai approached us about hosting our site on their CDN. I understand that Akamai has a very powerful CDN network with a ton of PoPs, but I wonder if that is worth the additional effort with price, configuration, and maintenance that would come with using Akamai. I am also not a big fan of their dashboard. I personally find it to be a bit confusing.

    If the delta is performance is negligible, I would prefer to go with Netlify because it is so much easier to use and the additional tools are so good. For the record, I am also considering Vercel.

    submitted by /u/cmcaboy
    [link] [comments]

    Background header video.

    Posted: 30 Apr 2021 12:54 PM PDT

    Hey! Maybe someone has a good idea what specifications should background header video have to play smoothly and not negatively affect website's performance? Like what size, length, frames and bitrates should be? My client wants a 30s video, is it acceptable for a good UX? Much thanks for your knowledge!

    Edit: I mean in the hero section!

    submitted by /u/s3n3k4
    [link] [comments]

    Frontend components with Golang

    Posted: 30 Apr 2021 06:41 AM PDT

    What is the correct way to make your posts/likes appear right after posting with ajax?

    Posted: 30 Apr 2021 04:08 PM PDT

    There seems to be a bunch of different ways to go about this.

    Do you code-in a get request right after each post/put request ?

    Or is websockets made just for this ?

    submitted by /u/illevens
    [link] [comments]

    Thoughtful noob questions about CSRF/CORS/JWT on multi-tenant websites.

    Posted: 30 Apr 2021 04:05 PM PDT

    What happens:
    - I have a multitenant project; backend is django+DRF, front-end is vue+axios; I use JWT for authorisation.
    - I get a 403 "CSRF Failed: CSRF token missing or incorrect" response on my tenant1.site.com/login when trying to lign as well as my root domain homepage (site.com/) when trying to send a post request that should be available to all users (it's a "register a new tenant" form).
    - I do not get it when I delete all cookies or visit it from anonymous browser.
    - I get it whether CsrfViewMiddleware is in my settings or not;
    - I've installed CORS toggler browser plugin and I get the error whether it's toggled or no;
    Questions about understanding:
    + In my head, should I separate the public side of my application and the logged-in-user-only side of my application when it comes CORS/CSRF ?
    + what is the relationship between CORS and CSRF ? Is it "either one or the other" ?
    + is the token auto-generated by my browser with the first response and then passed on with all the further requests ?
    + is the token supposed to be sent with all POST/PUT requests ? If not, what are some examples of typical exemptions ?
    + should I disagble CSRF globally and only assign it to the views I want to protect like django docs mention https://docs.djangoproject.com/en/3.1/ref/csrf/#how-to-use-it ? If so, is deleting it from middleware settings enough ? Also if so, how to use that with DRF ?
    Here are all the settings I thought might be relevant:

    MIDDLEWARE = [ 'django_tenants.middleware.main.TenantMainMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'corsheaders.middleware.CorsMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'crum.CurrentRequestUserMiddleware' 

    ] INSTALLED APPS = [ 'django_tenants', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'corsheaders', 'tenant', 'users' ] PUBLIC_SCHEMA_URLCONF = 'dirdem.public_urls' ROOT_URLCONF = 'dirdem.urls' WSGI_APPLICATION = 'dirdem.wsgi.application' CORS_ORIGIN_ALLOW_ALL = True CORS_ALLOW_CREDENTIALS = True

    requirements.txt: 

    asgiref==3.3.1 Django==3.1.7 django-cors-headers==3.5.0 django-crum==0.7.9 django-tenants==3.2.1 djangorestframework==3.12.4 psycopg2-binary==2.8.6 PyJWT==1.7.1 pytz==2021.1 sqlparse==0.4.1

    submitted by /u/illevens
    [link] [comments]

    Snuggsi — Easy Custom Elements in ~1kiloByte

    Posted: 30 Apr 2021 08:21 AM PDT

    Launch Code?

    Posted: 30 Apr 2021 07:36 AM PDT

    Hey all! I just wanted to see if anyone here has heard of Launch Code? I saw the program being offered in my city and was interested in doing it but just wanted to see other people's experiences?

    submitted by /u/philsoul
    [link] [comments]

    Best way to put my program on the web for students to access

    Posted: 30 Apr 2021 11:17 AM PDT

    Hi everyone! I am a teacher, and I have a simple chapter review program that I would like to put on the web for my students to access. I am completely new to this and am looking for some guidance. It's a simple program that reads in a text file and outputs data to a text file (more details below). What I want seems simple: I want my students to be able to go to a web link to complete the activities in this program. I wrote the program in LiveCode, which has the capability to create HTML5 files, but I have no clue how to actually get it on the web. Someone suggested Digital Ocean droplets, and I tried to look into it, but this stuff is so over my head that I can't even tell if it's the right thing for me. I'm happy to do some reading, but I don't even know where to start. I'm looking for any suggestions.

    Here's what the program does: Reads in a text file containing chapter questions and answers, randomizes question order, displays the questions to the student, and students type in their answers. The program writes the data to a text file. Next time the student logs on, they enter their ID number, and the program checks the data file to see which chapters they have completed and gives them the questions from the next chapter. It's simple enough that something other than LiveCode would probably work too. I understand basic HTML, but that's the extent of my web programming knowledge.

    submitted by /u/MellyLelly
    [link] [comments]

    Is the Developer Relations role a meme?

    Posted: 30 Apr 2021 03:02 PM PDT

    I was watching someone on Twitch whose job was dev relations. They explained to me they basically get paid to live stream, promote the company, handle clients, go to meetings, and occasionally they will be assigned an actual project that they're the dev on. But what it mostly seems is they fill in a lot of gaps for a company with 1 role. Does anyone's company have a developer relations position? What is it like? Do you think this will become a more popular role in the future or is it just a meme? I'm interested in learning more about the role and what makes someone a good dev relations candidate as maybe that could be something I could think about getting into if I ever decide to back off doing full time dev work.

    submitted by /u/Kyism
    [link] [comments]

    How to achieve a card slide in animation?

    Posted: 30 Apr 2021 02:49 PM PDT

    Please take a look at the following basic example on CodePen:

    https://codepen.io/saadsawash/pen/rNjEzQG?editors=1100

    The pink div is a sidebar with a link. at first the second div which is the skyblue one, should be hidden, and when the user clicks on the link the whole div should slide smoothly from the left (From underneath the pink div).

    Do any of you have a tip or can help me out how to achieve the animation?

    submitted by /u/iEmerald
    [link] [comments]

    Using WebP fallback with CSP

    Posted: 30 Apr 2021 02:40 PM PDT

    I'm using the following to use WebP images with a JPG fallback:

    <img src="{{ $img_webp_desktop.RelPermalink }}" onerror="this.onerror=null;this.src='{{ $img_jpg_desktop.RelPermalink }}';" loading="lazy" height="{{ $img_jpg_desktop.Height }}" width="{{ $img_jpg_desktop.Width }}"> 

    However, with my CSP set to script-src 'self', the onerror inline script doesn't get executed and the fallback doesn't work.

    Is there any way to make this work with the CSP? Worst case scenario, I can enable unsafe-hashes.

    Thanks in advance :)

    submitted by /u/TheBestAwesomeNoob
    [link] [comments]

    How to get my first job?

    Posted: 30 Apr 2021 02:36 PM PDT

    Hi there! I'm a self thought and I was wondering what my main focus should be if I want to get an entry level job. I know html css js and ruby on rails for backend and I'm now teaching myself react and node js. I'm still not great I think and I was wondering what would it be the best way for me to improve and what skills and theoretical stuff should I learn to start to be a valid candidate. Thanks to everyone!

    submitted by /u/CalligrapherStreet46
    [link] [comments]

    Client Portal Question

    Posted: 30 Apr 2021 02:35 PM PDT

    Client Portal Question
    • Context of the problem:

    I am currently working on my website for my start-up. I work with WordPress so I'm not sure if this is the right subreddit, but I'll try anyway. I was looking for a way to implement a Portal for my clients where I can upload specific documents etc.

    Example:

    (Source: https://www.uplabs.com/posts/bank-client-dashboard)

    • Research I have completed prior to requesting assistance on this subreddit:

    I've been looking for a solution for over a month now. I'm not sure if I just don't know the right words for that solution or if it's impossible to implement it like that on a wordpress site. I've been searching for all relevant keywords but I can't find one serious blog, solution or video. The keywords I've searched for are: client portal, client login and registration, client dashboard, upload files for client on webiste etc.

    • Problem I am attempting to solve with high specificity:

    I want my clients to be able to log in (or register) and see a dashboard. On that dashboard they should be able to download documents I upload specifically for them. They should be able to track the process of whatever service they've ordered. For example so they can see the individual design they've ordered is at level 4 of 5 and it's getting ready for delivery. I'm not that knowledgeable in webdevelopment so at first I thought this portal has to be implemented in my website. But now I think it can be done otherwise. The clients could be redirected to another web application, where they can login, register, see their dashboard etc. Or am I wrong?

    The closest solution I've found is this one. But I am not sure if there is a more efficient way.

    What's the solution here, guys? I am very grateful for all your answers. I will be waiting patiently. Thank you!

    Edit: The dashboard would be very simple. I wouldn't need crazy features. Just individual file upload and process tracking.

    submitted by /u/kingury7
    [link] [comments]

    I'm scared and nervous

    Posted: 30 Apr 2021 01:27 AM PDT

    I'm in my last year of computer engineering. I will finish in June and will be starting a web dev job. But I'm feeling very nervous and scared about it. I'm not sure why.

    submitted by /u/dafedarray
    [link] [comments]

    Is it a good idea to use React to build an Ecommerce website ?

    Posted: 30 Apr 2021 05:31 AM PDT

    I want to build my own Ecommerce website, but I wonder if React is a good idea. I've used Shopify in the past but now I want to be the owner from the start.

    Also, Im a Dev (still junior) so React or Vue or whatever is not the problem, just want to know if its adapted. I plan to use Nodejs with MariaDB for the back.

    What do you guys think ? Thanks.

    submitted by /u/lee657
    [link] [comments]

    If I make a website for a friend, could any issues arise from reposting the code as a public site on GitHub, even if I get their consent?

    Posted: 30 Apr 2021 05:28 AM PDT

    My friend wants to run a mini-online business and I'm thinking of creating a site for them while getting a project done for my portfolio.

    I'm not sure if the friend will always have the site live so we discussed and I'm thinking about re-posting the code when I'm done and maybe changing the business name and other names for privacy and having it as a sample project of my work on GitHub for my work portfolio by aiming to focus on the functional aspects and design.

    Could any issues with security or assumed plagiarism arise from copying my own work publicly through GitHub? Is there any better way to go about this? Is there also some way to prevent a random person from plagiarizing the code? I have no clue how to approach this.

    submitted by /u/Ianteepeedood
    [link] [comments]

    No comments:

    Post a Comment