• Breaking News

    Thursday, August 30, 2018

    To all you freelance/indy devs out there: ALWAYS protect your work product web developers

    To all you freelance/indy devs out there: ALWAYS protect your work product web developers


    To all you freelance/indy devs out there: ALWAYS protect your work product

    Posted: 30 Aug 2018 08:53 AM PDT

    This can be tricky with open source and when you're working on teams, but let me illustrate with an example.

    A team I'd heard about was looking for a new WP dev. After extremely thorough vetting for a very small project, I was offered a small pilot project. The team leader sent me (1) an NDA, (2) a non-compete, and (3) a project requirement/process document to sign.

    The project requirements said that I was to do all work on their server. After a walkthrough of some of the other points with the team leader, I asked if there was room to compromise on that point because I need to protect my work product. I explained that I typically retain full control of the codebase until I've been paid in full. I put it up on a staging server for the team and the end client to view (using a suitably generic domain name I've used forever), and then I take care of transferring it to their server after I'm paid in full.

    He balked.

    "You think I want to screw you?"

    "I always pay all my devs on time!"

    "If we do it your way then we might encounter fidelity issues since we need to move it to a different server afterwards."

    All of those responses are complete and total bullshit, no matter how nicely or innocently the person means them. I recommend if you encounter objections like these that you run for the hills.

    That team had just sent me THREE agreements of theirs to sign, all to protect their interests. What about my interests?

    The one singular interest of yours that's worth protecting is your work product. Once its handed over, it can't be gotten back. For whatever reason, sometimes circumstances and emotions make people do things they wouldn't ordinarily do, and if you've given up control of your work product then you have absolutely no bargaining power whatsoever and you're relying on people's good graces to pay you.

    Don't think that just because you have an agreement stating you'll be paid that you'll actually get paid.

    Besides, what are your options if you don't get paid? Hire an attorney? Get on a plane? The time and money you'd end up spending just to recover what you're owed may make it not even worthwhile.

    TLDR; protect your work, nobody else will!

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

    How do you move up as a web developer?

    Posted: 29 Aug 2018 08:31 PM PDT

    I went back to college in my late 20s to study web dev. I'm finished college, finished my web dev coop. Now I'm ready to enter the field. I'm going to live in an expensive city (Toronto) and will likely make a lowly amount between 45k - 55k as a junior. I won't even be able to save money.

    How will I move up to the point where I could make six figures? I have a long way to go, but how does a lowly web developer move up through ranks to the point of making 100k+? Would I have the opportunity to move into management once I have 5 years or so of experience, assuming I work hard?

    I'm 30 yo now and fresh into this. I need to somehow move up the ranks quick.

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

    I created a video series that teaches Progressive Web Apps from scratch

    Posted: 30 Aug 2018 06:40 AM PDT

    Is there an end-to-end GraphQL solution that makes things streamlined? I want to use graphQL but I don't want to manually write a bunch of DB calls and edge logic.

    Posted: 30 Aug 2018 10:02 AM PDT

    If there was a DB based on it, maybe a Koa permission system built around it, I feel like the server could mostly just handle permissions and pass along requests and even updates to the database. Anything like that floating around?

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

    Here is my first actual "web app" developed with React and API: As a rookie, any feedback on my process/architecture is welcomed

    Posted: 30 Aug 2018 04:22 PM PDT

    https://github.com/jfarris587/weather-plus

    "Weather Plus" React App

    https://i.imgur.com/sgI7pKT.png

    This is the first real "web app" that I've made which is interactive, dynamic, and uses an API, and implements something like location services. It was built using React and OpenWeather API. Since it's my first, feedback would be appreciated. I tried to architect the files in an organized way from the SASS to the React components.

    When developing, I didn't "pre-decide" what was going to be a component, and what not, let along whether they should have state or not. I decided as I went along. Basically as I was developing in a component, it got to a point where I said "there's a lot of HTML here and too much going on, lets break it up..." and I made changes to things as I learned...

    Would it be better to continue to add and improve on this? or move on to another project?

    Maybe if its poorly constructed then I should continue, or if I could do things differently as well.

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

    TIL how to setup @babel7 with webpack for react projects

    Posted: 30 Aug 2018 02:04 PM PDT

    Since I was preparing and practicing to learn React and mostly Redux, Thunk, Webpack. I was setting up a basic project with webpack as an attempt to learn webpack, specifically the latest version, v4.

    Don't follow the flaw in article just yet, if you are directly looking for final conclusion with @babel7`, because I'm going to explain the error that I have encountered.

    I followed Traversy Media's video on setting up webpack for react boiler plate projects and also read the Webpack's official docs just to understand the concepts.

    First, I set up the repo with npm init and done all the basic checkmarks to which my package.json generated.

    Then I installed all the basic npm libraries that I would need in my project with npm install --save react react-dom react-router-dom react-redux redux This generates a new object in our package.json file named as dependencies. After which I would install all the dev dependencies, so since this is all about webpack so I first installed webpack and all its needed peripherals as following:

    npm install --save-dev webpack webpack-cli webpack-dev-server

    It creates another object in package.json named as "devDependencies" and stores all the development dependencies over there.

    After that we need babel to transpile our ES6, ES7+ code to javascript that browsers understand i.e., ES5 ( correct me if I've misunderstood). So for that we need to install all the babel and dependencies related to it.

    npm install --save-dev babel-core babel-loader babel-preset-react babel-preset-env

    and after that I have configured my webpack.config.js in the root folder as follows:

    ``` const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin');

    module.exports = { entry: './src/index.js', output: { path: path.join(__dirname, '/dist'), filename: 'index_bundle.js' }, module:{ rules: [ { test: /.js$/, exclude: /node_modules/, use: { loader: 'babel-loader' } } ], }, plugins: [ new HtmlWebpackPlugin({ template: './src/index.html' }) ]
    }

    ``` Also first don't forget to install html-webpack-plugin because it let's recognize webpack about the html template we are going to use which we will configure in a few minutes.

    Now Webpack's basic flow goes something like this, it has an entry` object where we define location to our index.js file which is where our react-app is going to be

    then it has an output` which uses Node.js default path module to showcase the directory where our output bundled will be generated

    then it has this modules in which we define our rule that which files are needs to be compiles and bundled when we build the application. in which we use also define our babel-loader

    at the end we can define all of our plug-ins in an array with their new` instances each time.

    So after all this I set up my basic react-app in src/index.js` but it was just giving simple error of

    ERROR in ./src/index.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module 'babel-preset-env' from 'B:\Shall\Practice\mystarter' - Did you mean "@babel/env"? at Function.module.exports [as sync] (B:\Shall\Practice\mystarter\node_modules\resolve\lib\sync.js:43:15) at resolveStandardizedName (B:\Shall\Practice\mystarter\node_modules\@babel\core\lib\config\files\plugins.js:101:31) at resolvePreset (B:\Shall\Practice\mystarter\node_modules\@babel\core\lib\config\files\plugins.js:58:10) at loadPreset (B:\Shall\Practice\mystarter\node_modules\@babel\core\lib\config\files\plugins.js:77:20) at createDescriptor (B:\Shall\Practice\mystarter\node_modules\@babel\core\lib\config\config-descriptors.js:154:9) at items.map (B:\Shall\Practice\mystarter\node_modules\@babel\core\lib\config\config-descriptors.js:109:50) at Array.map (<anonymous>) at createDescriptors (B:\Shall\Practice\mystarter\node_modules\@babel\core\lib\config\config-descriptors.js:109:29) at createPresetDescriptors (B:\Shall\Practice\mystarter\node_modules\@babel\core\lib\config\config-descriptors.js:101:10) at presets (B:\Shall\Practice\mystarter\node_modules\@babel\core\lib\config\config-descriptors.js:47:19) @ multi (webpack)-dev-server/client?http://localhost:8080 (webpack)/hot/dev-server.js ./src/index.js main[2]

    And I was totally unable to understand that what is going on, so I kept asking about queries in Reactiflux Discord Server in #need-help. I started uninstalling babel, and then install it again, and then I did the ultimate try

    rm -rf node_modules

    and tried to install babel-loader again, but it was still giving the same error of not being able to find the babel-preset module. Then I got to know that Babel has just released the newer version v7 in which the naming conventions has been changed and I need to first uninstall all of those

    • babel-loader
    • babel-core
    • babel-preset-env
    • babel-preset-react

    and install them as follows with @babel/core and @babel/preset-react, etc. After all this head banging I thought wow the newer version is going to handle all problems, but nope it still didn't.

    Since the starting I had .babelrc setup as but I need to change the presets with the newer version and naming convention such as

    { "presets": ["@babel/env", "@babel/react"] }

    Thus once the webpack understand the loader with the newer versions of babel it would take care of the error itself.

    I learned a key thing from this that I guess no other articles online for @babel-7` had explained/shared.

    So I thought to share my learning from today this way. I hope this helps and I get to be the new pioneer star, though I would like to be a React-Redux star and not the babel for now, because jobs/work you know!

    I know I daydream a lot in the previous sentence. But yeah this was a simple TIL @babel7`. Enjoy till next time when I understand more about Redux Middlewares and it's side effects.

    Thank you for the read. Please correct, explain, guide me into more deep level details of this occurrence.

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

    We made a new reddit fork called saidit.net, trying to bring back the spirit of old reddit when Aaron Swartz was still around. It loads in 0.096s, has embedded IRC chat, new voting system, RES features being made native, open source code, night/day mode, and more. What does /r/webdev think?

    Posted: 30 Aug 2018 12:10 PM PDT

    This feels wrong. Is there a better way?

    Posted: 30 Aug 2018 11:59 AM PDT

    I am developing a website where users can talk to each other. So lets say user A wants to talk to user B...

    I want this to feel similar to receiving a phone call, so I want A to be able to click a link/button to send a call request to user B, when this happens, user B gets a pop up on their screen.

    I am currently doing this using long polling but I feel like its sloppy and could be done better.

    I set up a table ('calls') in my database and creates a new entry saying that A tried to call B at this time, and give that entry a status property of new.

    In B's browser, javascript is asking the server every 1 second to check the table for any calls labelled as "new", and if so, create an alert allowing B to respond.

    The calls in the database table also have other status values which are "answered", "declined", and "ignored".

    I am currently trying to think of a way to make the server automatically change the status from new to ignored, if user B does not respond to the call. Needing to tell the server to update something after a specified time period makes me think of cron jobs, but that seems like overkill.

    Is there a better way I should be doing this? I have used long polling on the site a few times for instant messaging windows, but something about this feels wrong.

    EDIT:

    looks like websockets is what everyone is suggesting, which I though of already but was under the impression it would be more work for the server. Seems like maybe I was wrong, so this would be the way to go.

    But, I already have the messaging and instant chatting between users completed using long polling and my client wants this done fast and cheap, so it will probably stay that way. I may use websockets for the initial calling.

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

    [Discussion Time] Do you host fonts locally or use Google Fonts CDN?

    Posted: 30 Aug 2018 05:06 PM PDT

    What do you do when dealing with fonts? Do you host the fonts locally? or do you use Google Fonts? Let's assume the font you want is available on Google Fonts.

    When I started out web development years back, I downloaded my fonts and used them locally. Nowadays, I usually use Google Fonts.

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

    Single Page Scrolling Websites with Routes Possible?

    Posted: 30 Aug 2018 04:59 PM PDT

    I am planning on building a single page scrolling website with vertical sections of content. I am aware that we can utilize anchor tags to navigate users to a section of a page but my concern is with google SEO. I want the site to still have a route structure like page.com/contentA, page.com/contentB instead of page.com/#contentB

    I believe having the routes will be more SEO friendly and since it is a content website, it would be nice if I go to page.com/contentA the page will just scroll to that specific part of the page.

    I am using React with React Router v3 and so far I am thinking to define a route for each content and have the same Container component show for each route. Then I could just add an onEnter handler to the routes and scroll to that specific element. I've actually tried this idea but running into issues with elements returning null since it doesn't exist on initial load.

    Would like advice on how I could go about implementing this type of website that is SEO friendly for each piece of content.

    Just want to add that this is a client's requirement and if I could, I would just split them out into their own pages with their own routes.

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

    Web Performance Made Easy: Google I/O 2018 edition

    Posted: 30 Aug 2018 06:05 AM PDT

    Recommendations for an API only CMS

    Posted: 30 Aug 2018 03:55 AM PDT

    i have a requirement for a project i'm working on where a user will create content (rich html, embedded video) and then other users will be able to view it. What headless CMS' are good for this? In my research it seems they mostly require you to create the content on the CMS' website, I just need an API only CMS. Any recommendations?

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

    Which backend do I choose?

    Posted: 30 Aug 2018 12:38 PM PDT

    I already know front end quite well but I always felt like backend fits me better. I used Django for some time and I loved it (especially for the ORM and admin panel) but there arent any jobs in my country and overall the framework seem more dead than alive. Now I decided to give node.js a shot but all the npms scare me and I don't know if thats right decision. I want to be hireable in 3-4 years so I'm not in a hurry. Can anyone tell me? Honestly I feel like django is the best and I like every part of it but I dont know how long will it last. Flask feel even worse in terms of popularity

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

    How to edit this webpage repo from Github?

    Posted: 30 Aug 2018 04:18 PM PDT

    This is my first time helping someone on Github and I'm not able to ask him directly how to do this. I am using Visual Studio Code as my IDE and the structure is confusing since I don't see how to see my edits. I've never seen an "_incldues" folder containing all the html files. My problem is that when I live preview any page I'm working on I just see the plain HTML since each HTML file is decoupled from the CSS, JS, and all other libraries and stylesheets. Do I need to use something else other than a preview of the HTML file or attempt to manually import every dependency into the HTML file which I'm working on?

    EDIT: here is the repo image:image

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

    Github removes jQuery from their front-end. No framework.

    Posted: 30 Aug 2018 04:16 PM PDT

    What are the questions you were asked on your job interview?

    Posted: 30 Aug 2018 03:46 PM PDT

    My website is loading on desktop, but on IPhone it says server cannot be found.

    Posted: 30 Aug 2018 09:35 AM PDT

    Hey there. I apologize as I posted about this site yesterday, but I ended up changing some things that made it to where I had questions that didn't pertain to the OP. Therefore, I decided to delete the thread and start over.

    olsenday.com is hosted at GoDaddy. It currently loads on my desktop (when it loaded for the first time it initially flashed some message about my IP on the screen before loading), but not on my IPhone. On my IPhone it says "server cannot be found".

    Can anyone help me figure out what the problem is?

    Edit: I was using Chrome on my desktop. I just tried it with Internet Explorer where it initially didn't work, but then after several refreshes, started working.

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

    What is the most efficient way to take values from input an input field in a row and calculate them?

    Posted: 30 Aug 2018 03:32 PM PDT

    Howdy folks!

    The below code is one row of 20. I know I can assign ID's to each input to manipulate it's input value and then display it's value in the "Result" DIV.

    Can someone point me in the right direction? An answer would be great, but tips would be super helpful to my learning.

    What I want to do is take the 4 input values from this row, manipulate and then display results.

    <div class="cdmrow"> <div class="cdmcol"> 

    Row 1 </div> <div class="cdmcol"> <input class="cab" type="text"> </div> <div class="cdmcol"> <input class="cab" type="text"> </div> <div class="cdmcol"> <input class="cab" type="text"> </div> <div class="cdmcol"> <input class="cab" type="text"> </div> <div class="cdmcolhalf cdmyour"> <div class="result" </div> </div> <div class="cdmcolhalf cdmyour"> <div class="result" </div> </div> <div class="cdmcolhalf cdmyour"> <div class="result" </div> </div> <div class="cdmcolhalf cdmyour"> <div class="result" </div> </div> </div>

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

    Questions about Flexbox vs CSS Grid

    Posted: 30 Aug 2018 10:12 AM PDT

    It's 2018.

    Questions: 1. What is the deal with these two? Why are there two things for building layouts? 2. There seems to be an unclear understanding of what each one is used for. With flexbox, we can distribute rows/cols into equal spaces given a viewport. Can't CSS Grid do the same? 3. What are the main differences that everyone should know about flexbox and CSS Grid? 4. Which one should we go with when considering device/browser compatibilities? 5. Should I learn both? Which one should I learn first?

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

    Pros and Cons: Form Data vs JSON

    Posted: 30 Aug 2018 10:08 AM PDT

    Hi,

    in a project of mine I'm developing a nodeJS application with Typescript and planned on using Axios. Now there's a backend whose APIs I want to consume, some will be POST requests. The backend only accepts Form Data and does not process JSON in request bodies at all. Axios doesn't support it, and you have to use some workarounds with other npm libraries or use request-promise-native. The question I'm having now is: Do I not use Axios and send Form Data requests, or should the backend change and start parsing JSON bodies? Effort-wise, it's obviously easier to just use RPN instead of axios.

    What are the cons and pros of both methods? Things I've found that are bad with FormData:

    • no nested/complex structures (i.e. pet1, pet2, pet3 vs pets: [{pet1: ...}, {pet2: ...}, {pet3: ...}])
    • urlencoded (issues with foreign languages and special symbols) example
    • less repetition and therefore less data transmitted example

    So what are your experiences with both? Any clear advantages with either or should I just switch from axios to RPN? Or will I run into issues in the long term?

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

    How much RAM do I want with Apache+Wordpress?

    Posted: 30 Aug 2018 01:36 PM PDT

    Currently I'm using Amazon Lightsail with a 512 ram server.

    Should I move to 1 gb ram?

    Today I had over 160 users at the same time and I didn't notice any problems - do I need to upgrade?

    Here is the output from "free -h"

    https://imgur.com/FmBPnoO

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

    Is there a code pen or any tutorial on how to make the beautiful hamburger menu on Google's homepage?

    Posted: 30 Aug 2018 12:34 PM PDT

    Is this normal?

    Posted: 30 Aug 2018 08:48 AM PDT

    So I am learning web development. I have a fairly good understanding of HTML and CSS and I'm still working on Javascript right now.

    Anyways, so I'm doing the html/css projects on freeCodeCamp for practice. And just starting out, I always feel so lost.

    Like when I see other people's code, I understand everything completely. I know exactly what does what, how to change up the code to make it how I want it. But it's just starting out adn getting everything done--I completely blank.

    My friend told me it was normal. And even experienced devs use other peoples code to manipulate or even premade templates/code.

    So is my progress, in this context, normal? Or am I not relaly understanding anything so far?

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

    How to Make Parallel Calls in Java Springboot Application and How to Test Them?

    Posted: 30 Aug 2018 07:47 AM PDT

    No comments:

    Post a Comment