• Breaking News

    Monday, February 10, 2020

    What are some things that new devs tend to forget or neglect when moving to production? web developers

    What are some things that new devs tend to forget or neglect when moving to production? web developers


    What are some things that new devs tend to forget or neglect when moving to production?

    Posted: 10 Feb 2020 06:45 AM PST

    Per the title, I often find myself wondering what I'm forgetting or neglecting when moving from development to production. Things like easy-to-miss security holes, accessibility, etc. I'm curious to hear your thoughts on what us noobs can't seem to get right!

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

    ICANN Allows .COM Price Increases, Gets More Money 

    Posted: 10 Feb 2020 02:51 PM PST

    Introducing MockRequests, the first network-mocking library that's actually user-friendly!

    Posted: 10 Feb 2020 05:07 AM PST

    This small but powerful library provides a simple, one-stop-shop configuration for mocking network responses for any URL.

    ~ ~ ~ ~ ~

    Quick background: The company I work for has regular network outages about twice a week during company-wide deployments. During this time, the entire back-end is inaccessible which stifles front-end development. Originally, we were manually replacing fetch(apiUrl, options) with Promise.resolve(mockResponse) in any src file that made a network request. I knew there had to be a better way, but after searching around, the only solutions were:

    1. Continue replacing fetch calls in src code.
    2. Using a third-party JSON hosting service, which would still result in changing src code to swap URLs from company.com/api/X to thirdparty.com/mockApi/X.
    3. Running an additional node server locally, which would involve either the same issue as (2) with replacing company.com/api/X with localhost/api/X, or lots of complex setup with proxy interception, particularly because instead of just running our local apps on localhost, we require HTTPS with a modified subdomain, and each team would require a different configuration so there wouldn't be an easy one-size-fits-all solution with this. Not to mention that running two servers just for the front-end increases computer resource usage, which could be troublesome for those with older computers or have multiple IDEs/programs open, and could conflict with those already running multiple local servers for full-stack development.

    ~ ~ ~ ~ ~

    Essentially, what I wanted was a quick, single point of entry that I could call once and it would just work throughout the entire app. I didn't ever want to have to change the src code (neither fetch calls nor URLs), and wanted something that I could distribute to all other teams I work with that would require little to no setup on their end other than the obviously required URL-response mapping.

    Having found nothing that met all those requirements, I made this library, which still to this day I find simpler to use and more feature-filled than others in the field. So I just wanted to share with all of you in hopes that someone else would also find it as helpful as my coworkers and I did.

    A quick rundown of the features this provides:

    • No changing source code! With this library, you don't need to replace either the URL called (e.g. https://real.url/api -> (localhost|third-party-mock.com)/mockApi) or the fetch call (e.g. fetch(url) -> Promise.resolve(mock)).
    • No painful configuration of complex node servers, proxies, or anything else! Simply install, make a single function call, and mocks will work automatically for your entire app.
    • Full support for use along with third-party libraries, such as Axios and jest.
    • Dynamic response modifications to mimic back-end alterations of data.
    • Query parameter parsing to optionally mock all URLs with the same pathname using the same dynamic response function.
    • Mock response resolution times for different URLs individually.
    • Simple configuration to split mock code from production code and/or activate mocks via terminal (e.g. MOCK=true npm start).
    • Configure all URLs you desire to mock within one single MockRequests.configure() function call and the entire app will use mocks even without importing MockRequests.
      • A side effect of the one-stop-shop configuration offered is the ability to easily switch app-wide mocks between different logins. Just nest each login mock inside a single object and choose which one you want within the configure call, e.g. MockRequests.configure(loginMocks.alice).
    • Mix mock responses with real API calls by only configuring the URLs you need mocked (in the event that some URLs are working but others aren't/haven't been developed by back-end teams yet).
    • It's all open-source, so anyone can contribute or fork to modify as they see fit.

    Feel free to check out the in-depth ReadMe and install, see the JSDoc, source code, or check out the React demo.

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

    Freelancer advice - code or wordpress?

    Posted: 10 Feb 2020 08:39 AM PST

    Hi,

    Before I begin this is not really a question about WYSIWYG but more of what is your opinion about what can one person do and still deliver good results. I am looking for advice of people who might have similar experience or scope.

    I have 6+ years of brand/product marketing strategy under my belt. For the last 2+ years I have been focusing on more digital side (online campaigns, digital media etc.). All of that time for quite big corporations. For the last year I am playing with idea to go solo for several reasons, mostly because I am gettig sick of corporate life and due to family reasons. I already work occasionaly with a few small companies where I consult time to time, set up some social media strategies etc. All of these small companies also asked me if I could do a web presentation for them. Since their budgets are very small (could not afford agency) and their demands low, I was able to use wordpress with the help of elementor and a few plugins to achieve a result I am not really happy with but that kind of works. But I know that when I am asked to do more, I would start to struggle. Also the code for such a simple website if too big and complicated. Well what would I expect from WYSIWYG... So I started to learn code recently. HTML, CSS, Java (from this udemy course). But I am starting to wonder If I am not stretching myself thin. If it is even possible to be a one-man-army and if it is something that is sustainable and advisable in this area. Learning front-end is something I thing I am capable of quite well. But should I learn also backend? the course I am following is focusing on node.js. Is this kind of web development something managable only by a person who focuses only on development and leaves marketing to others? Is it too time consuming? I am good at strategy and marketing part. But I would also like to be able to deliver the website part. My ambition is not to create big complex projects. It is about smaller presentations, maybe a small shop, reservation form, newsletter subscription etc..

    Not sure if I got my point across. But I can specify if needed...

    Thank you.

    EDIT: Just wanted to tell you I appreciate all the answers. Nobody told me how stupid or misguided or naive I am. That was something I half expected. Maybe I was lucky on people who noticed this post but this community seems really great..

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

    An Argument for Automation by Kent Dodds

    Posted: 10 Feb 2020 10:34 AM PST

    Can Anyone Recommend a Place for More In-Depth Tutorials?

    Posted: 10 Feb 2020 05:57 AM PST

    Hi,

    There is a huge amount of information available to new developers all over the web and that's fantastic. I often find that the majority of material tends to scratch the surface of a subject rather than thoroughly cover it.
    Can anyone recommend great resources for more in-depth tutorials?

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

    Looking for an API for practice projects

    Posted: 10 Feb 2020 12:03 PM PST

    Hi everyone!

    I'm looking for some free APIs ideally from the UK government that I can use to build some practice projects. Really interested in creating data visualisations from them and would be great if they were related to education. No problem if not but just looking for something real to take advantage of!

    Thanks in advance!

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

    Free Services to help prevent spam/troll-accounts, and help to verify people

    Posted: 10 Feb 2020 07:45 AM PST

    I'm working on a project where there will be certain filters for members, such as age and gender restrictions, where it'll be easy for people to abuse the system and get into places where they simply don't belong.

    We've checked for multiple services, most of which are so expensive is ridiculous.

    We're just wondering, can you guys and girls recommend any services out there who provides services to, in some way, verify that the person is who they claim to be? the service will be in Sweden by the way, so only services that works here are of value to us.

    If no service, how would you recommend getting the most secure and protective product you possibly can, without paying all too much? I know those two statements doesn't exactly go hand i hand, but is there ANY way to make this somewhat easy?

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

    How to structure my data in Firebase for my Invoicing Application

    Posted: 10 Feb 2020 07:44 AM PST

    Hey Everyone,

    So I have been learning React from the past couple of months and now I feel confident enough to start working on my major project for college.

    I want to make an Invoicing App with React and Firebase. The basic features are mentioned below

    • Generate Invoice (PDF and Email)
    • Store previously generated Invoice
    • Updating invoice status (Paid or Not)
    • Multiple Users and Auth

    I have no prior knowledge about backend programming and databases, but I have made a simple todo app with Firebase and React. So I chose to use Firebase(Firestore) as the backend for my app.

    Here is a screenshot of the data I want to store for a single user [having 1 invoice saved]: https://imgur.com/J7Ujn0Q

    I am having difficulty with how to structure the data for my application; where/how to use collection, documents, sub-collections, etc. The Todo app I made had just a collection having multiple documents.

    Can anyone who knows NoSql Database/Firestore help me and recommend the best possible way to structure my data for this Invoicing App?

    All the data I need to store is in the image linked above.

    Thanks!

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

    What Niches Lend Themselves Best to Remote or Freelance Work?

    Posted: 10 Feb 2020 01:09 PM PST

    I've been freelancing on-and-off on the side for a few years, and I want to get a better view of what my options are in regard to marketing and specialization. I've been focused on front-end web development, thus far, but I'm getting the impression that there are many freelancers in this field already, and that perhaps it's saturated. Of course, professionals who are truly skilled will always be able to carve out a place for themselves in the market, but I'm wondering if I could benefit from adjusting my approach. The questions I have are:

    1. What are the main niches or specializations within web development that have a good outlook, and aren't yet occupied by many developers?

    2. Aside from web design and development, what other fields or sub-fields within computer science lend themselves well to remote work or freelancing? They don't have to be programming-oriented necessarily, so long as they are skills that a developer and someone generally tech-savvy could pick up relatively easily.

    Thank you in advance.

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

    Is there still valid reason to use <li> to create a nav menu?

    Posted: 10 Feb 2020 07:39 AM PST

    It has been a long custom to use <ul> to create navigation. We just need to remove the list-style, padding/margins and apply a float to force it to become horizontal.

    Now, we have flexbox. Is there any compelling reason to still use <ul>?

    The way I see it, we can wrap each navigation item in its own container and float it to our heart's content.

    <nav class="flex justify-center align-center">
    <div><a href="#">a</a></div>
    <div><a href="#">b</a></div>
    <div><a href="#">c</a></div>
    <div><a href="#">d</a></div>
    <div><a href="#">e</a></div>
    </nav>

    What do you think?

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

    I’m attempting to host a website on aws ec2 instance, what do I do about my environment variables?

    Posted: 10 Feb 2020 06:13 AM PST

    I've been looking to host my website on Amazon's ec2 instance. How should I go about adding my environment variables? Like database connection, secret keys etc... should I just upload my .env file? Is that secure? Or should I add them in a different way?

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

    Crafting a Cutout Collage Layout with CSS Grid and Clip-path

    Posted: 10 Feb 2020 06:10 AM PST

    Independent devs and freelancers what's your gear like

    Posted: 10 Feb 2020 03:47 PM PST

    I'm transitioning from corporate life where my gear is provided into contract and freelance work. My home machine is a little lackluster and I'm hoping to get some suggestions for hardware.

    Looking for something less than 2 grand. Obviously, the less expensive the better. I'm also considering renting a spot in a co-working facility, so mobility would be nice.

    So what's the freelancers in r/webdev preferred setups?

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

    Thoughts on unit testing of UI components

    Posted: 10 Feb 2020 03:34 PM PST

    So, I'm a big fan of automated testing. The more the better - to an extent.

    I'm wondering what current thinking is on unit testing of UI components though? Personally I'm using React, and just started looking at Overmind for state management. And this complicated things a bit.

    I can very easily test stateless components. Things like a "Page Loading" widget, or a breadcrumb trail. Pass in props, check it renders correctly. Pass in callbacks, interact with it, check things happen correctly. That's easy.

    Where it gets messy is with stateful components. With pure React it's not too hard - just that the "interact with it" stage gets more involved. With external state management it gets harder since you need to be able to get this into the desired shape first, which isn't always easy. Especially when it represents the entire application state and starts from zero.

    And then there's the more structural components. Entire pages made up of many other components and all needing to work correctly together. This is much more an integration test than a unit test, and navigating it to test particular cases gets messy fast.

    So what do people really do for this? Are there any good examples of what to do - or what not to do! - and how best to go about it?

    Cheers

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

    How to bring your neural network to the web - Hope it helps!

    Posted: 10 Feb 2020 05:47 AM PST

    What Is Your Hourly Rate For Web Dev?

    Posted: 10 Feb 2020 03:22 PM PST

    I've been freelancing for a little over a year now and I still have a problem with confidently stating my hourly rate to clients because of the fear of not getting the account (?)

    I'm trying to get an idea of what the industry standard/average is for web development for Wordpress and other PHP-based sites, that way I can get a sense of if mine does make sense.

    TIA!

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

    Best way to rate limit anonymous users?

    Posted: 10 Feb 2020 11:35 AM PST

    I'm working on a project where anonymous users make requests and I'd like to rate limit them to something like 10 requests a day. But I'd prefer not requiring them to log in. Then they can optionally pay to remove the rate limit in which case they'd need to create an account.

    Is their a better way to do this than relying solely on ip address?

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

    Is this typewriter effect possible?

    Posted: 10 Feb 2020 03:12 PM PST

    Hello! I'm building my website right now, and I'd like to implement a typewriter effect for my website banner.

    In essence, there would be a static portion of the banner text that says, "I need" which is then followed by a preset group of solutions that type themselves, then backspace themselves, with a new solution being typed each time. For example:

    "I need a barber."

    "a barber" gets backspaced, and then the new solution is automatically typed out:

    "I need a dogsitter."

    The effect is intended to simulate the end user typing in a query.

    This cycles through the preset list of solutions, eventually looping back to the first solution. Is this effect possible? If I recall correctly, I've seen it done on a website or two in the past. Thanks for your help!

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

    Can a larger local base64 image take longer to load than a smaller one?

    Posted: 10 Feb 2020 07:41 AM PST

    I'm not sure if this makes sense but I seem to be having this problem where very large base64 images eg. 4-6MB as a file that then become base64(so bigger) are slow to load. There is no transport other than being pulled from IndexedDB which I understand there is lag there/async. But can it be explained why two local base64 files would load differently based on size. Whether to load into an ,<img /> or as a css background-image

    I do have plans to implement client side image resizing but I have to test that isolated(canvas stuff) before integrating into my app's state flow.

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

    Leanest, easiest stack for solo dev working on side projects?

    Posted: 10 Feb 2020 02:46 PM PST

    I primarily work in data engineering and have experience with a handful of languages (Python, Scala, PHP, C++), but really enjoy building apps (web/desktop/mobile).

    I have a number of apps I'd love to build for myself and family, but want to go as lean as possible. What recommendations would you give for:

    - Web framework

    - Authentication & Authorization framework

    - Server/API

    -Database (and data model, SQL vs. Document)

    -Mobile Framework

    Where I'm starting to think I'll land is with a traditional MERN stack (no Typescript), where there's plenty of code reuse for mobile. Thoughts?

    Some of these I'd love to be able to access from work (or elsewhere from my phone), so I'm concerned about self-hosting and opening my network up to the internet. Are these concerns valid?

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

    Where do you guys host your projects?

    Posted: 10 Feb 2020 02:25 PM PST

    Hey guys!

    I'm pretty new to web development and I wanted to know your opinion on hosting sites, which one do you use, why? Etc!

    I have a small project in mind and I want to know the whole process, frontend backend, hosting, databases etc! I've done some projects but most of them where just hosted locally.

    Thanks and have a good day!

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

    Reusing navbars and footers - best practice?

    Posted: 10 Feb 2020 02:10 PM PST

    I am a noob to webdev but it seams like copy/pasting the same navbar and footer html into every page isn't ideal, but I don't understand website optimization very well and don't want to inadvertently make things worse.

    Right now I made a navbar.html and footer.html and then add them with a tag like <div class="nav-placeholder> and then load them in a script.js file with jquery like so:

     $(function(){ $("#nav-placeholder").load("nav.html"); }); 

    This requires me to load the full jquery (slim doesn't have load() I guess). That make me questions if this is actually an improvement. It definitely seems cleaner but, like I said, I don't understand the optimization end of web design very well. Thoughts?

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

    No comments:

    Post a Comment