• Breaking News

    Wednesday, March 3, 2021

    /r/webdev is now a Discord Partner - join at discord.gg/web web developers

    /r/webdev is now a Discord Partner - join at discord.gg/web web developers


    /r/webdev is now a Discord Partner - join at discord.gg/web

    Posted: 03 Mar 2021 07:27 AM PST

    SpaceTraders is a free to play space economy and strategy game backed by a RESTful API. If you've been eager to learn how to work with HTTP APIs and wanted to play with something a little more interesting than reading public data sets, SpaceTraders is perfect for you!

    Posted: 03 Mar 2021 11:09 AM PST

    Is front-end and back-end validation a huge pain in the butt or am I just doing it wrong?

    Posted: 03 Mar 2021 01:41 AM PST

    I'm making my first real project which I'll actually put online when I'm done with it, hence why I'm trying to make it as foolproof as possible both on the front-end and the back-end. This has proven a bit difficult because of the validation. I need to foresee all possible input scenarios and add validation for them, in order to prevent the user or someone with postman from sending wrong input.

    Even with libraries like Vuelidate and Express-validator, I still feel like it is such a hassle to deal with and I'm never too sure if I've covered all possible bases. Is that just me or is validation a nuisance in general?

    Edit - Woah, thanks for all the tips and pointer fellas, I appreciate it!

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

    Safari with Apple's M1 chip is an absolute beast

    Posted: 03 Mar 2021 11:51 AM PST

    Safari supports WebGPU experimentally with WSL kernels. I wrote a simple tuner that tries to optimize matrix multiplication. If you have Safari, you can try it here. (You'll need to enable WebGPU in Develop > Experimental Features.)

    My M1 MacBook Air achieves 900GFlops after a couple seconds of tuning. My Intel MacBook Pro only hits 100GFlops with the same exhaustive search.

    For reference, MobileNet v3 Large (x1.0) is ~219MFlops. Running at this performance, it could do 4,500 inferences per second. The base BERT model (12 layers) is 11.2 GFlops. At this perf, one could theoretically run it 90 times a second.

    This is mind-boggling performance for the browser!

    For those curious about WSL kernels:

    Here's the code. The basic idea is to tile memory accesses, vectorize, use mad instructions and tune for threading and dispatch parameters.

    The result is a kernel that looks like this:

    ``` [numthreads(2, 8, 1)] compute void main(constant float4[] A : register(u0), constant float4[] B : register(u1), device float4[] C : register(u2), float3 threadID : SV_DispatchThreadID) { uint m = uint(threadID.x); uint n = uint(threadID.y);

    float4 result_0_0 = float4(0.0, 0.0, 0.0, 0.0); float4 result_1_0 = float4(0.0, 0.0, 0.0, 0.0); float4 result_2_0 = float4(0.0, 0.0, 0.0, 0.0); float4 result_3_0 = float4(0.0, 0.0, 0.0, 0.0); for (uint k = 0; k < 256; k++) { float4 a_0_0 = A[(m * 4 + 0) * 256 + (k * 1 + 0)]; float4 a_1_0 = A[(m * 4 + 1) * 256 + (k * 1 + 0)]; float4 a_2_0 = A[(m * 4 + 2) * 256 + (k * 1 + 0)]; float4 a_3_0 = A[(m * 4 + 3) * 256 + (k * 1 + 0)]; float4 b_0_0 = B[(k * 4 + 0) * 256 + (n * 1 + 0)]; float4 b_0_1 = B[(k * 4 + 1) * 256 + (n * 1 + 0)]; float4 b_0_2 = B[(k * 4 + 2) * 256 + (n * 1 + 0)]; float4 b_0_3 = B[(k * 4 + 3) * 256 + (n * 1 + 0)]; result_0_0 += mul(a_0_0.x, b_0_0); result_1_0 += mul(a_1_0.x, b_0_0); result_2_0 += mul(a_2_0.x, b_0_0); result_3_0 += mul(a_3_0.x, b_0_0); result_0_0 += mul(a_0_0.y, b_0_1); result_1_0 += mul(a_1_0.y, b_0_1); result_2_0 += mul(a_2_0.y, b_0_1); result_3_0 += mul(a_3_0.y, b_0_1); result_0_0 += mul(a_0_0.z, b_0_2); result_1_0 += mul(a_1_0.z, b_0_2); result_2_0 += mul(a_2_0.z, b_0_2); result_3_0 += mul(a_3_0.z, b_0_2); result_0_0 += mul(a_0_0.w, b_0_3); result_1_0 += mul(a_1_0.w, b_0_3); result_2_0 += mul(a_2_0.w, b_0_3); result_3_0 += mul(a_3_0.w, b_0_3); } C[(m * 4 + 0) * 256 + (n * 1 + 0)] = result_0_0; C[(m * 4 + 1) * 256 + (n * 1 + 0)] = result_1_0; C[(m * 4 + 2) * 256 + (n * 1 + 0)] = result_2_0; C[(m * 4 + 3) * 256 + (n * 1 + 0)] = result_3_0; }

    dispatch params: 128,32,1 ```

    Clearly more can be done to tune it (such as factoring out the K dimension a bit more or doing more levels of tiling), but I'm quite happy with the results. Hitting nearly 1TFlops in the browser (50% of peak) is extremely empowering and it's exciting to see such technology available.

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

    Using Apple Silicon (M1) as a cloud engineer, two months in

    Posted: 03 Mar 2021 10:42 AM PST

    The small web is beautiful

    Posted: 03 Mar 2021 04:55 AM PST

    This was an interesting 2-minute audio clip from the founder of Stripe, Patrick Collison: "Building Good Software Isn't Rocket Science"

    Posted: 03 Mar 2021 01:45 PM PST

    In the self-teaching phase, how did you get past having zero design sense whatsoever?

    Posted: 03 Mar 2021 12:52 AM PST

    I get that when working professionally you will have designers to give you designs for you to recreate in code, so it's not a problem then. But what about in the self-teaching phase? I'm working alone here

    I have zero design, artistic or creative sense whatsoever. The only creativity I have is in problem solving, which is why I like programming.

    I have fully working back ends for two different projects, but I don't know where to start on the front end at all, so the projects are just lying dormant.

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

    jQuery 3.6.0 Released - "We still have our eyes on a jQuery 4.0 release"

    Posted: 03 Mar 2021 08:28 AM PST

    Name This Color - simple little website experiment

    Posted: 03 Mar 2021 08:55 AM PST

    DataTables always hides one column in responsive mode - even on desktop

    Posted: 03 Mar 2021 07:25 AM PST

    This one is driving me crazy and I know there's some simple solution but I am stumped.

    Example URL:

    https://www.allmysportsteamssuck.com/predictions-beta/?league=NCAAB&start=2021-03-03&end=2021-03-03

    As you can see, it gives the + sign to expand (i.e. for responsiveness) but there is adequate room on my desktop (1600 pixels wide) for the column to be rendered. In fact, if I turn off Datatables on the table, it renders just fine.

    What am I doing wrong here? It does this on a few other tables I have too, where there's adequate width but it creates an expand button just to show one column, which is so very frustrating.

    Thanks in advance for any help, I'm so stumped by something so simple!

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

    Sometimes I notice I have lulls in work where I feel like I should be doing something, is this normal?

    Posted: 03 Mar 2021 02:30 PM PST

    I'll sometimes have days that I have nothing to do. I learn new stuff/take classes, but I feel like I should be maybe busier than I am. Do you guys have the same thing go on?

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

    Solution to prevent React multi-page form from reloading with every change?

    Posted: 03 Mar 2021 08:23 AM PST

    I'm working on a sign up implementation on a large React app which requires multiple pages. I'm working on one specific page but every time I make one change in the code, I have to start the whole form over again. Is there a way to temporarily prevent this while working on one page so I don't have to keep starting over?

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

    Paid full stack web dev course advice.

    Posted: 03 Mar 2021 10:59 AM PST

    I am UK based and am almost finished a Learn Direct Web development foundation course which has gone through basic HTML, CSS and JavaScript. I've also got access to the Udemy courses and am around a quarter way through the 2021 Web Dev Bootcamp which I'm really enjoying. I have a budget of around £2000 to spend on another course to improve my knowledge and learning further and would like to ask what courses you good people here would advise I take a look at. I know there are lots of great free resources like Free Code Camp but this budget needs to be used as it is part of a leaving package from a previous employer and I want to use it for learning in tech. I also work a full time job (in a totally different industry) and need a course to be flexible so I can do an hour a two each day when I have time.

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

    Portfolio projects that can be used in the real world

    Posted: 03 Mar 2021 01:10 PM PST

    Hello, I'm in the process of building my portfolio up, and I'm looking for some inspiration & ideas for my next project!

    Theres tons of ideas for projects on the internet, but I'm hoping to find something that can be used by real people in my community. For example my last project is a platform where local business's can sign up and list their products.. think craigslist but for local business's.

    Reddit clones, calendars, chatrooms etc. are all cool but I really want it to be helpful to my community.. I'm working with the MERN stack, and would love to find something with a large back end!

    Thanks :)

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

    OAuth2 with Golang Server not working

    Posted: 03 Mar 2021 03:36 PM PST

    So i've wrote a server with net/http, as seen here. it has the same and only route in my OpenAPI Spec. My actual API definition file can be found here.

    When I run my swaggerUI at the specified route, it sends back the text I've written in my server code. This should not happen. OAuth2 should send me the 401 error because the user has not yet been authorized? Whats wrong here?

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

    noob looking for help restoring wordpress folders backup

    Posted: 03 Mar 2021 03:27 PM PST

    hello, i have a wordpress backup and need help restoring it

    I have the backup zip and when I unzip it, it has the plugins folder and themes folder and the uploads folder. Inside the upload folder I can also see the database.sql

    This backup was made for me 1-2 years back for my Wordpress website and I dont know how it was done or what program was used. When I open the backup I see files inside so it looks like it's a completely backup.

    The new hosting I want to upload to is also c panel like how my last website was. The domain will also be the same so I don't need to change anything.

    I tried following some Google guides by installing Wordpress and then manually uploading the folders however when I visit the website it doesn't seem to use the files that was uploaded if that makes sense. Like the Wordpress admin page acknowledges my plugins howver it doesn't seem to show any more data or pages. I think it has to do soemtbing with my database sql however I don't know what to do with that.

    I tried using those plugins in Wordpress to help me restore the website but the few that I used keeps saying something along the lines of "this backup wasn't created by this plugin"

    Could someone plz guide me thru this process. I was hoping I could put my backup file into a program which would be able to dissect it and then put everything in the proper place. Is there something like that to restore my website? Thx

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

    I am trying to get all of the images inside a folder to display on a gallary page of a website im designing. I used stack overflow for help but it only got me 90% there. The images just arent displaying even though theyre so close...

    Posted: 03 Mar 2021 03:24 PM PST

    What is the maximum you would spend on a non-dotcom domain name?

    Posted: 03 Mar 2021 03:09 PM PST

    I am mulling the purchase of a domain that would go well with my branding for a project / startup that i intend to scale. The problem is that it is almost $300 and it is not a dotcom. I have purchased the domain.org. If I get this new tld, I would have doma.in (obscuring actual domain name and tld).

    The dotcom is available but it is almost $6000 so I will not be purchasing it.

    If you could see the tld fitting good with your branding, what is the maximum you would spend?

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

    Google Material Icons

    Posted: 03 Mar 2021 02:49 PM PST

    Potentially an alternative to Fontawesome?
    https://fonts.google.com/icons

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

    Someone asked if I can make them a site for their law firm...

    Posted: 03 Mar 2021 02:24 PM PST

    I didn't say yes or no but told them up front that my experience is limited to a web design class I took as an elective lol. Basically I'm familar with HTML, CSS, and some javascript. Never really took on a professional project.

    However, I kind of leaning to say yes for the challenge and some real-life experience but I don't want to bite off more than I can chew. The potential client just wants something simple like information on her, her practice, and contact info. I guess my questions are is this something I should do from scratch or use wordpress? Is 2-3 weeks a good timetable? should I even bother hah and most importantly how much should I charge?

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

    Modern Roadmap for Java Programmer Starting Web Dev

    Posted: 03 Mar 2021 01:53 PM PST

    So I come from a Java background and did a lot with data structures and algorithms to build my own software but I never really grasped the concept of how handling the back-end works and how things interact with one another on the web.

    I'm still a high-schooler but it's my goal to become a full stack web dev and have the necessary knowledge to pickup any libraries, APIs and frameworks. Future proof languages and skills are also important to me as you will come to see in the following. So here's a rough idea of what I wanted to do:

    1. HTML
    2. SASS - Initially I wanted to do CSS but my research found that SASS is more concise, quicker for development and interacts with web pages faster (correct me if I'm wrong)
    3. Typescript - I wanted to learn Javascript at first but apparently the statically typed nature of typescript is better for avoiding bugs as much as possible. This is probably also most suitable for me since I come from a Java background.
    4. React - I'm tired of the shitty Java libraries so I'm excited to be trying react. Also, I used to be a Swift/SwiftUI dev before Java so I'd be interested to try out react native as an alternative (lol Facebook fanboi)
    5. Node JS - This would be my second framework to learn in typescript. As I'm trying to head for a MERN (MongoDB, ExpressJS, ReactJS, Node) stack.
    6. MongoDB
    7. Express JS

    How does this sound? I'm trying to go for a MERN stack because I don't know what I like so far. I'm into algorithms but most importantly I like making my ideas a reality so maybe it's fullstack. I'll just have to try it out.. Thank youuuu if anyone answers.

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

    Build a blog website for someone with no coding knowledge to edit

    Posted: 03 Mar 2021 01:04 PM PST

    Hi, I'm pretty sure this has been done a dozen times, but I just can't seem to find an answer.

    I want to build a blogging website for a friend from scratch. He want's to publish blogs to them himself. How would we go about this? He has no real coding knowledge.

    How would you guys solve this problem.

    Thanks

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

    Gyro-web: Accessing the device orientation in JavaScript

    Posted: 03 Mar 2021 02:49 AM PST

    No comments:

    Post a Comment