• Breaking News

    Monday, February 24, 2020

    Vue.js: The Documentary. web developers

    Vue.js: The Documentary. web developers


    Vue.js: The Documentary.

    Posted: 24 Feb 2020 11:45 AM PST

    How do you avoid slacking when on a nice salary and no boss over your shoulder?

    Posted: 24 Feb 2020 02:39 AM PST

    Throughout my life I've either clocked in and out or billed by the hour or project. A fixed salary is new to me.

    Add to that "work at home on some days" options (full remote is my future goal).

    Add to that no strong incentive to log extra hours (it may even be a disincentive if pay doesn't change, only performance reviews).

    How do you guys keep your drive high and take ownership of your work as if it was your own?

    The stability of a salary seems cool but I ask about this because as a freelancer trying to find something more stable, this is a major point of concern for me. When output ties to results my productivity and work ethic is naturally high. I never felt the same way in school and wonder if salaried work can cause motivation problems.

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

    Curated list of productive tools for web development

    Posted: 24 Feb 2020 12:26 PM PST

    Are You interested in a series implementing the same application in Vue, React, Angular, Svelte?

    Posted: 24 Feb 2020 12:31 PM PST

    Last months learning React after Angular and Vue, I've come to the conclusion that frontend frameworks are very similar. I've started implementing the same application (at first Todo app) with nearly identical files, components and store structures.

    The application list would consist of the following (some of them are already complete):

    My question is that are You interested in an article series showing the similarities/differences between these frameworks? Or even a website where You can choose between the topics (like rendering or component interaction) and the frameworks and it prints out the implementation side-by-side?

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

    The internet seems to say React is more popular but most of my friends who work as developers all seem to be using Angular

    Posted: 23 Feb 2020 09:51 PM PST

    It seems most of my buddies who work at large companies (mainly enterprise) as front end developers seem to be using Angular 2+, yet on the internet everyone seems to be using React. So what is it really? Does Angular actually get used more in a professional setting but is not reported as much?

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

    What action to take: my single page app website mirrored on another domain

    Posted: 23 Feb 2020 07:50 PM PST

    Hi,

    I just received an alert on Adsense that my ad id is being used on a domain I haven't added to my account, I checked what domain it was and it seems that someone just copy pasted the static js and css files on their server and the site is fully functional on their domain, doing api calls to my backend for content, even supposedly showing ads with my publisher id.

    So my question is what course of action should I take? Have you been in this situation?

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

    Visualize 2D/3D Vector Fields With Three.js

    Posted: 24 Feb 2020 03:08 PM PST

    A Guide to Console Commands

    Posted: 23 Feb 2020 11:59 PM PST

    What to teach in a course (free, for Brazil), about front-end?

    Posted: 24 Feb 2020 03:54 PM PST

    I am out of a job and without any motivation, and invest the little money I had in a logo / mascot, a domain and a microphone, and I will produce free content and try to receive donations to pay the bills, and maybe stay in this teaching field for a few years, because I am starting a degree in Statistics and I want to change my area in about 2/3 years.

    Well, I intend to start in the following order: http and browser> html> css> javascript> SPA concepts> React ecosystem> JWT auth> Basics about dns> Netilify.

    Well, about html and css, I know the content to teach, with some extras, like open graph tags for html.

    Now, about browser and HTTP I'm a little confused. There is a great book on HTTP (The Definitive Guide), where I can take the most important concepts of this and teach them in the module about HTTP. And as for the browser, I know only the basics to show, how to inspect the page, show requests for networks, storage (cookie, localStorage etc).

    And I want tips on how to produce high quality content.

    And I also intend to add exclusive content for monthly donors, such as projects, projects with monitoring, etc.

    PS: I am Brazilian, I started studying programming two years ago and I am currently in a Statistics degree lasting 4 years.

    PS: this will be a online course, in youtube or my site.

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

    What is the price for SSR?

    Posted: 24 Feb 2020 02:09 AM PST

    What is the price for SSR?

    I am an engineer and my default is skepticism. I rather look at numbers and I tend to ignore vague claims "better for users", "faster speeds", "more revenue" and such.

    I know our kind. When we pull some nice tech feat - and SSR is that - and it works well we love to show off. We write blogs, we create charts, we publish youtube tutorials for others to replicate, we benchmark, we scream all the details about our success, customer's measurable happiness bump and soaring sales in consequence.

    So I googled some real-world SSR success stories with numbers and benchmarks. And to my surprise I didn't find any.

    Closest what I came to was 2 years old post The Performance Cost of Server Side Rendered React on Node.js and few articles with charts in Asian languages.

    So I ask Reddit, how come? I would expect at least numbers of success stories, quality and strength of evidence to match the strength of SSR narrative which seems to be as strong as any fundamental religion.

    Developers of the world, do you have any real (React) SSR migration stories with numbers to share?

    Source https://malloc.fi/performance-cost-of-server-side-rendered-react-node-js

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

    Loose ends, relation framework and web server

    Posted: 24 Feb 2020 02:41 PM PST

    I imagine this question is by now the very definition of bland, but even after having looked around for well over an hour I don't quite feel like I have a complete image.

    What is the exact relation between first developing in a framework, then deploying it with a web server? To make things a little more concrete: if I were to develop a web application using Django, what exactly changes when I deploy it to a server running eg Apache? What does Apache offer the Django framework(ie, when I'm testing my application on localhost) does not provide? I would very much appreciate if the answer could touch on all the differences briefly.

    My current knowledge is as follows:

    Apache is a web server, implying it handles incoming requests. Since Apache does not inherently know how to communicate with any external languages to generate dynamic files a "gateway interface"(I might be using this term wrong) is included in the stack. In case of Python we would need an implementation of WSGI. So the Apache webserver gets a request, looks at the WSGI implementation which then proceeds to execute the appropriate Python scripts in the interpreter, yielding a result to return to the client.

    What is the advantage of doing the above, if described correctly at all, in contrast to "just using Django"? Also does the above imply all Django modules/libraries used during development must be available on the server at all times?

    Thanks a lot for reading, and hopefully helping!

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

    Need help to understand CORS

    Posted: 24 Feb 2020 07:29 AM PST

    Sorry I know this is a popular question. I have done researched a couple times but I still don't fully understand.

    First, I think CORS is to protect the client, not server. Is this correct?

    Because obviously, it's the responsibility of the server administrator to protect the server.

    If the first question is correct, then it is to protect the client and I think this has something to do with cookies.

    I found at least 2 places saying that cookies is automatically sent even if it is cross origin.

    https://www.reddit.com/r/javascript/comments/8rn8ja/i_dont_understand_how_cors_works/e0t0brz/

    What happens next: A user (Bob) logs into our site and checks his balance. Bob then navigates to the evil website. The evil website also includes a request to our API that transfers funds from Bob's bank account to an evil one. The browser automatically attaches all cookies for our origin (url), including his auth tokens.

    https://stackoverflow.com/a/41687744/2691976

    Let's imagine that a browser user is logged into their banking site at A.com. When they navigate to the malicious B.com, that page includes some Javascript that tries to send a DELETE
    request to A.com/account. Since the user is logged into A.com, that request, if sent, would include cookies that identify the user.

    And the user emphasize this point in the comment

    The browser would include those cookies because that's how browsers are expected to work (as codified in standards like RFC 6265). Whether or not a browser uses separate processes for tabs is an implementation detail, it won't keep it from sending cookies.

    So I did an experiment and it tells it is not true.

    Create a backend app using flask It has 1 endpoint to set the cookies. An another API endpoint, that will look at the request cookies.

    Create anotehr frontend app, using flask to serve the index.html. It only has 1 JavaScript to use `fetch` to send a request to backend app

    Backend app runs at localhost:3000 and frontend runs at localhost:3001.

    I first open localhost:3000 and let the server to set the cookies for me.

    Then I open localhost:3001 and verifed that the `fetch` to localhost:3000 did not attach my cookies of localhost:3000. (Of course I enabled CORS in Flask so the fetch request worked)

    To be more sure my JS code works, I copied frontend JS code to backend app. The fetch automatically attaches the cookies.

    So experiment conclusion is: Browser attaches cookies if it is the same origin. Otherwise, it doesn't.

    So are those 2 answers are wrong?

    I tested on Firefox and Chrome.

    Is it that this is a new browser version behavior? But if new version does not attach cookies automatically, then there is no reason to keep CORS restriction in new browser version.

    If you think my experiment conclusion is wrong, I can share the code so you can point out which part of the code is wrong

    Thanks for reading till the end. Really appreciate your help!

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

    How to choose back-end programming language? Does it even matter?

    Posted: 23 Feb 2020 08:29 PM PST

    So, I have experience as a desktop applications programmer. There, picking the right programming language is pretty important, but also something that is well understood. If I need bleeding edge performance in a hardware-restricted environment, I'll go with C++. If I'm making a desktop app that's Windows only, I'll go with C# and the Windows UI libraries/framework that basically come with it. If I'm writing a simple automation script that doesn't necessarily need the best performance, I can go with Python.

    Now, for most of these, the crucial first step is understanding what you'll be working on and what programming language is appropriate for the situation. I've gone back to college and have been taking an upgrading class (or whatever they're called), and a lot of our focus has been on the web (specifically in ASP .NET Core 3).

    I've been looking around the web for what back-end programming languages/frameworks people can use, and which one is appropriate for which situations, but I feel like I've hit a wall. Django, ASP .NET Core, Ruby (on Rails), PHP, Node.js, Java, Go, etc. all pop up constantly. Whenever I try to find what situation should X be used in I just get a bunch of search results like:

    "Which back-end programming languages should YOU learn in [2014-2020]?! Number 6 will SHOCK you!"

    "Why you should use X back-end language for everything!"

    "Why you shouldn't EVER use X again!"

    These aren't very useful. They seem to mostly be fanboys telling you why X is so good/bad, instead of giving actual examples of when something is the appropriate tool for the job. I've also seen some posts claiming that in 2018 (when it was posted), the back-end language you use hardly matters unless you expect disgustingly high levels of traffic and activity throughout your website and to just use whatever you're comfortable with (as long as it also allows you to do your job quickly). Hell, I've seen people recommend against learning new stacks because they said that they ultimately didn't matter if you already knew some (which I kind of disagree with).

    What little information I've gathered so far is the following:

    • Stuff like Django and Ruby on Rails come with a bunch of pre-built functionality that can make development time faster.
      • Although Ruby on Rails doesn't scale as well as Django.
    • Interpreted languages like Python aren't necessarily slower than statically typed ones as long as you aren't dealing with incredibly high levels of activity (found some benchmarks stating that Django could comfortably handle 100,000 users a day with light-medium activity).
    • Be careful with PHP and try following the practices from PHPTheRightWay if you do use it to avoid problems.
    • Some of these frameworks/languages have better support for modern web practices than others (seen this from experience with .NET Core 3's kind of "meh-borderline-bad" Ajax support if you're using Razor Pages, meanwhile Django comes with built-in REST support).

    This doesn't really give me a whole lot to go on, especially since most of the "articles" I can find on "what to use when" just gives me clickbait or clearly biased "only ever use X".

    I'm guessing that, just like in desktop development, the problem you're dealing with will influence the language you'll use, but I'm starting to have doubts about it based on the amount of people saying it doesn't matter, but the webdev area of software development kind of has a reputation for not always using the right tool for the job, so I'm not sure how accurate those comments are.

    So, could someone give me some examples of what situations/problems would warrant using a certain language or framework? Does it ultimately matter (as long as you're using a mainstream language)?

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

    Custom Data Format: Evolving HTML and CSS language features

    Posted: 24 Feb 2020 11:12 AM PST

    Trying to figure out why Github Pages will not serve my documentation

    Posted: 24 Feb 2020 04:26 PM PST

    Hey all!

    I use sphinx to build html documentation, and am in the middle of open-sourcing some of my company's private repos.

    Internally, we serve documentation from an S3 bucket through Cloudfront so we can put access controls in front of it. But for open source, I figured publishing via Github Pages would be the path of least resistance.

    However, I cannot get the service to work correctly.

    Here is my repo, with my index.html in the /docs directory.

    Here is the site, which is not applying any of the linked css, and with all page links broken.

    I tried to isolate the issue by making a test repo with just the built documentation, and publishing from master.

    As you can see, this one does not even try to serve the index.html, I just get a 404 page.

    These files work both locally and when serving from AWS, so I'm a little at a loss for why Github Pages is not serving it correctly. I feel like I must be making some sort of dumb oversight. If anyone with more experience could take a look and point me toward the error of my ways I would really appreciate it. I'm a backend engineer for the most part so website logic is a little outside my normal wheelhouse. Thanks in advance!

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

    Object and Array "Rest/Spread" is a super powerful piece of syntax. Get to know it a little better!

    Posted: 24 Feb 2020 04:23 PM PST

    Is There Animation in Web Development?

    Posted: 24 Feb 2020 04:20 PM PST

    So I found this animation Bootcamp I want to go to. If I go into debt for school it may as well be for something that interests me right? I figure I'll do the Bootcamp and then I'll try to learn full stack on the side.

    Would I be at all in demand after all of this? Are there animation web dev jobs out there?

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

    Email services, SMTP and Wordpress

    Posted: 24 Feb 2020 03:54 PM PST

    I'm an experienced dev and understand the world of web development, but when it comes to email I'm stumped (like a lot of people).

    I want to use my own domain with an inbox, easy enough I can connect it with gSuite or rackspace email hosting. But I also want to send emails from my wordpress website using SMTP (not mail.php), perhaps a confirmation email or sales report from the backend. Do I need another service to do this, such as sendblue or MailChimp? Or is there one service which will send automated emails from wordpress via SMTP and also act as an email client for my emails (inbox/create/send etc)

    Any suggestions appreciated

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

    Anyone used Userfront?

    Posted: 24 Feb 2020 03:49 PM PST

    I saw this tool in one of my slacks along with an invite code: userfront.com

    Has anyone ever used it? We are looking for a super easy to set up auth option and it seems like a good option, but trying to avoid any red flags.

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

    What is the most productive VS Code theme and Font combo?

    Posted: 24 Feb 2020 09:41 AM PST

    What is the most productive VS Code theme and Font combo, sometimes looking at those colors of VS Code for long makes me wanna throw up 🤮

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

    Looking for JavaScript practice quizzes for a job assessment

    Posted: 24 Feb 2020 11:33 AM PST

    Hi all, I'm looking for some practice tests as I have an IKM assessment I need to complete for a web development job. Preferably these would be multiple choice, testing theory as well as some "what will the code produce if..." styled tests, as this is what the assessment will contain.

    I found some online but they all seem very basic, and none that focus on one specific area such as async., security, etc.

    Any suggestions are appreciated, thanks.

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

    How will you go about creating an online code judge system like leetcode etc?

    Posted: 24 Feb 2020 05:49 AM PST

    Hello everyone, im working on a project where i need to build an online coding judge and run user submitted code.

    i have a few ideas about how i will go about implementing this, but i would like to know other people's opinions on the security risks that i should be aware of and how would you go about mitigating those issues.

    for example i can specify gcc compiler flags to harden the security, but how will i go about preventing arbitrary code execution?

    thanks a lot!!

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

    Drag and Drop Multiple Question - Help Needed

    Posted: 24 Feb 2020 05:36 AM PST

    I've only recently become aware of the drag and drop feature in HTML. My knowledge on JS is minimal, however, I wanted to challenge myself a bit and make a Drag and Drop Multiple questionnaire.

    I've tried a few different ways of doing it, and finally found a way to drag and drop more than one item on a page. Now, for some reason I can't get the first half of the circle to mach up with the second half visually, nor can I get the 'landing boxes' to stay still when dropping something in them.

    I also can't figure out how to check the id in the drop-box container to check if the answer is correct, as they all have the same id, only the answers id change.

    I've attached a link to a Google Drive folder if anyone can take a look and tell me what I might be missing, or doing wrong. If I should drop the code anywhere else, please just let me know, and I will do so.

    I would also appreciate any links too useful info that could help me in this learning journey!

    https://drive.google.com/drive/folders/14P7gGBsJZ7JYYLseApFPe3iI_T3xuz8R?usp=sharing

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

    Is web app performance important? Why?

    Posted: 24 Feb 2020 02:14 PM PST

    I'd love to pick your amazing collective brain and see what you think about web app performance.

    Is performance important? If yes, then why is performance important? Is there a limit to how much performance is enough performance?

    To give you some context, I'm obsessed about speed. I love seeing and using fast websites and built a few of my own that received complements for performance. But I started thinking recently, what if I'm over indexing importance of speed? What if it is not truly as important as I perceive it? Thus the questions above.

    Thank you!

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

    Gentle introduction into compilers. Part 1: Lexical analysis and Scanner in TypeScript

    Posted: 24 Feb 2020 12:55 AM PST

    No comments:

    Post a Comment