• Breaking News

    Thursday, April 15, 2021

    Wanted to share a coding task I was asked to do in an interview. This is how to handle this type of situation. web developers

    Wanted to share a coding task I was asked to do in an interview. This is how to handle this type of situation. web developers


    Wanted to share a coding task I was asked to do in an interview. This is how to handle this type of situation.

    Posted: 14 Apr 2021 07:32 PM PDT

    Released: Docker Desktop for Mac [Apple Silicon] - Docker Blog

    Posted: 15 Apr 2021 11:06 AM PDT

    Is being a web dev still a good job in 2021?

    Posted: 15 Apr 2021 11:01 AM PDT

    Hi everyone,

    I would like to ask you for some honest advice. I originally learned to program as a hobby, then got into web development, and worked as a frontend dev for a company making websites for a while.

    The thing is, I'm not really good at it and also not 100% passionate about it. For me, it was an opportunity to do something I don't dislike and have a nice, stable job, but I wonder now if it is enough for having a future in this industry.

    I hear a lot of voices, saying that the market is saturated, the competition is getting too strong, and you don't have a chance as a mediocre programmer.

    I'm not afraid to put in the work to get really good at it. Is it worth it though? As a job, is it still a better option than other career paths where I'd had to get a whole new education or degree for?

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

    How to make a PWA Add to Home Screen work?

    Posted: 15 Apr 2021 02:45 PM PDT

    I have been banging my head against the wall for two days. The net is filled with absolute useless tutorials.

    How do I make this work right? So that when the user clicks the button, the question to "Add to Home Screen" pops up.

    It only works in Chromium on the desktop.

    https://markdownpastebin.com/?id=bd9f266e5639430aa7e97c0c5f81fb3a

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

    React-like components without react?

    Posted: 15 Apr 2021 09:12 AM PDT

    I'm starting to freelance, building small static sites for clients. I've had one client and used react, MAINLY for the components feature and maybe a nice router.

    I do think this is a bit over the top and can impact speed, so is there any way to componentize html without a large framework?

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

    Code quality vs delivering value

    Posted: 15 Apr 2021 10:05 AM PDT

    Almost a decade in web development I still don't know how to go about writing good code, whatever that means, versus solving business problems quickly.

    We would probably all agree that having quality code by itself does not provide any value to the business or the customers. No matter how clean the code is, if it does not work well (in a human, not defect-free sense) and solve business problems, it's just waste.

    The business rationale for a quality codebase is there. Spending time now planning the architecture and refactoring would allow you to spend less time fixing bugs or working around architecture limitations in the future. However, it's pretty hard to reliably estimate exactly how much future time you're saving. I feel like a good chunk of my work conflicts happens when people disagree over the future-time-saved estimate.

    I can now perfectly see exactly why most systems look like a trash bin, and I even gained sympathy for the business-first approach. Most features in an agile setup seem to go like:
    1. Build it somehow — no sense to worry too much about code quality here, since we're likely to throw it away later.
    2. Fix some critical bugs — now we're live, so, again, no time to spend moving too much stuff around.
    3. If the feature lives, it now works fine for 90% cases. Better to go build something else than move the old code around.
    Now it seems like we've made reasonable decisions to just throw together a pile of code that barely works. However, you may (or may not) get in trouble later when you want to change something around there. In all honesty, only the system core gets in the way often enough to be a refactoring candidate. And maybe this is fine?

    Moreover, good code is more subjective than it seems. Should you endlessly request tiny code changes for readability in code review, if the code overall is fine?
    - How do you know if what you're suggesting is better?
    - Even if it is objectively better, is it better enough to spend time changing it?
    Sometimes I go with it, especially with junior developers who have a chance to learn something form it, but sometimes I just let go.

    What are your thoughts on this? Is there value in having good code? What is good code, anyways? Are we just here to throw together a pile of stuff that barely works? What's the point? Help.

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

    Good headless cms. Sugesstions ?

    Posted: 15 Apr 2021 12:06 PM PDT

    I am searching a simple headless cms. Any experiences or suggestions out there ?

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

    Gcode Arc to canvas Arc

    Posted: 15 Apr 2021 03:49 PM PDT

    I'm trying to make a tool that show Gcode on a HTML canvas. G0 and G1 are working for drawing line, but G02 is something I'm stuck now.

    G02 X25.943 Y5.1316 I-14.5607 J1.7442

    That is the Gcode line that I have, but how do I convert this to canvas with ctx.arc() or ctx.arcTo()?

    This is the result of what I have: https://jsfiddle.net/pa0txnjh/

    This is the correct: https://imgur.com/7NefuwL

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

    How do you manage email templates at a large scale?

    Posted: 15 Apr 2021 12:03 PM PDT

    We have a growing number of email templates that we are currently maintaining using SendGrid built in template solution.

    However, the process is very manual and error prone; we basically need to copy-paste all style changes across all templates whenever we make any style changes.

    I am looking for a solution that would allow me to write email templates using some approach that would be similar to either react or another component based system.

    Beyond just maintaining these templates, it raises questions such as:

    • How to preview them in different email clients?
    • How to inline styles to ensure maximum client support?
    submitted by /u/gajus0
    [link] [comments]

    One Port to Rule Them All

    Posted: 15 Apr 2021 09:50 AM PDT

    jQuery Mobile Swipe Question

    Posted: 15 Apr 2021 03:15 PM PDT

    Hi all,

    I have been going out of my mind for weeks trying to work this out. I have a toggle switch that changes content on click using jQuery. I would like to get this button to swipe left and right on mobile. I have come extremely close but it's still not there. I was able to get jQuery Mobile to work with my site (I used the custom download and only downloaded touch events). I was able to get it to send an alert when I swiped which was a win in my book, but I've written some code that isn't returning an error but not quite giving me what I want. I have also tried hammer.js but I can' t seem to get that to work either and I'm also not an expert in JS or jQuery.

    If someone could lend a helping hand and nudge me in the right direction, I really want to learn HOW to do this and get better at JS.

    Link to js fiddle: https://jsfiddle.net/gabbymarley/7qo0ksab/9/

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

    Noob here, starting a hobby website and dont know where to start, what language to use, etc. Example of what I want to achieve in the post

    Posted: 15 Apr 2021 03:06 PM PDT

    TLDR: How can I integrate a database in my website? (like the example down below)

    Example : www.ivanhoecambridge.com/portefeuille

    I know nothing of web design and I really don't know what are the technical terms of what I'm trying to do. Long story short I wrote a python script that scrapes municipal documents for new real estate projects permits and then upload them in a postgres database.

    How can I make something like the website I linked here ? What language is going to be used to integrate my database ? How do I design the UI ?

    Thanks!

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

    How to make this responsive?

    Posted: 15 Apr 2021 02:10 PM PDT

    Im having trouble making this responsive for the viewports between the phone view and 1300px (the max width container). Can anyone help?

    https://codepen.io/NinjaInShade/pen/LYxrOQL

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

    Ideas on generating/exporting report files on the fly with angular 9.

    Posted: 15 Apr 2021 02:04 PM PDT

    Hi all.

    I have a page showing some results and mainly these results are consisted out of D3.js plots. I now would like to add a button to download a report file (.pdf or even .md). This report file should contain the same plots but with some extra text explaining them. Also, there will be some cases that the template of the report could change.

    For example, if a specific variable is truethen the title of the report will change from 'Classification' into 'Regression'.

    Which is the most elegant way to do something like that? I understand that I will need a template file for the report (could it be a component, could it be a .md file?) pass to it the results object, and then do some magic and download it. Which are the most commonly used approaches in such cases?

    Also as for the images, I thought to convert the SVGs (created using D3) into base64 with something like the following and embed them into the report template.

    var s = new XMLSerializer().serializeToString(document.getElementById("svg")) var encodedData = window.btoa(s); 

    Any ideas or suggestions will be very welcomed.

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

    Vue.js for e-commerce? Anyone here in this sub can give me some advice for a small e-commerce store that I plan to build with vue?

    Posted: 15 Apr 2021 02:04 PM PDT

    Taking the Hamburger Menu To A New Level

    Posted: 14 Apr 2021 04:10 PM PDT

    Whats the best way to display dynamic tables in website?

    Posted: 15 Apr 2021 01:37 PM PDT

    I have tables and list of data of my employees. I would like to show it in a company private website. Had it been a static data, I would have simply used a static html way of displaying it, but its dynamic. The data changes time to time. So whats the best way to show the table in website? Should i use mysql? So that uploaded data automatically refreshes when updates in mysql. Or any other way? * dont want to use google sheet as it only have embed function to show, I cant customize the appearances and all.

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

    critique my approach and deployment please (use of AWS)

    Posted: 15 Apr 2021 09:32 AM PDT

    critique my approach and deployment please (use of AWS)

    Hey guys! Data engineer by trade, self taught on full stack and working on some freelancing to improve my skills.

    I recently deployed a frontend website that isn't expecting a heavy traffic load (maybe a few hundred to thousand of users per month). Wondering if folks would be willing to review the approach and provide feedback where you see fit.

    Thanks!

    Description of image:

    https://preview.redd.it/wx4b6nm45dt61.png?width=869&format=png&auto=webp&s=f1e77a342f2bc9db2a61cb147c1629bfe1159e01

    1. Route53 - chosen to handle DNS for domain.com , api.domain.com
    2. Frontend is written in Angular and deployed using Cloudfront. Cloudfront distribution setup to pull files from S3. I made use of AWS Certificate Manager to ensure that the connection to the site is being forced to HTTPS.
    3. Lightsail was chosen to deploy the API because of the low cost associated and predictable bandwidth and resources that come with the $5 a month package (1gb ram, 1vcpu, 40gb ssd). Within the lightsail instance, I have dockerized Apache and the Python based Flask application. Requests are served to the API over HTTPS (https://api.domain.com) and proxied to the container running Python which is not accessible directly to the public. The Flask container is running Gunicorn application server with 3 workers to ensure that multiple requests can be handled at the same time. Questions I have here: 1) is it safe to terminate the HTTPS at the Apache container? Basically saying that Apache receives the request but forwards it to the Flask container not in HTTPS. Is that standard practice? 2) I had to enable CORS for domain.com to request to api.domain.com although domain.com is TLD is the same here. Is that safe and common to do, or is there a better approach here?
    4. RDS Aurora for MySQL compatible. Data in this project is the most important part, and I think the features that come out of the box with Aurora ensure HA and resiliency. The DB sits within a VPC and peering is enabled between lightsail and rds to allow the private connection.
    submitted by /u/guru223
    [link] [comments]

    Workshop: Learn Computer Graphics by Writing GPU Shaders (in WebGL!)

    Posted: 14 Apr 2021 11:29 PM PDT

    Adjacent Canvases 50% Pixel gap

    Posted: 15 Apr 2021 12:38 PM PDT

    Hey everyone,

    I have 2 canvases that are 50% each, adjacent to each other, but on some page sizes there is a very small but noticeable gap in between them, about 1 pixel.

    I know that canvas percentages get calculated to pixels, so if the page width is an odd number, it makes sense that there is a gap between them (can't have half a pixel).

    However, divs manage to do it flawlessly, and am confused as to how that works and if there is a solution to remove the gap between the canvases?

    Any help appreciated !

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

    What magic is Postman doing when I select Authorization oAuth1.0?

    Posted: 15 Apr 2021 12:26 PM PDT

    I try to connect to an API that has no documentation. Or it's very limited. I know that it's oAuth1, I have a client key, a client secret and an example route to an event in the API (it's an event calendar). And apparently that's all Postman needs to take care of authorization and handle me a result! Postman somehow generates an auth_signature without me telling it anything about how to get a token…or anything about tokens at all. All I'm doing Postman is sending a GET request to a route in the API, choosing Auth1 as authorization type, entering key and secret, and voila. How do I recreate this in say Node.js? How did Postman retrieve the token without a token url? I'm slightly confused. Help.

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

    [Help] Is php worth learning?

    Posted: 15 Apr 2021 01:43 AM PDT

    Im new to programming and I've read that php is "on it's way out", but I've also read that a majority of websites on the net use php.

    For some reason php has my attention and I almost feel the need to learn it, but apparently websites that use it are transitioning their websites from php to something else... I've also heard that major projects will most likely not use php in their stack... why?

    I really want to dedicate my time to learning php, but at this point in time, is it worth learning? Should I learn something else instead, b/c I wouldn't want to learn a language that is regarded as "obsolete".

    To the php fans: I know you don't perceive php as "obsolete" so please don't be offended lol I come in peace! 👽 Anyway... I don't even know if php is obsolete or close to it, that's why I'm here! To hear from you guys, the experts!

    What back-end language do you recommend I commit to?

    Is php a go? Or a no go?

    Thank you for reading my post and I hope you guys could help me make a wise decision!

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

    What are your thoughts on including websites you didn't design but did do technical implementation on in your portfolio?

    Posted: 15 Apr 2021 11:52 AM PDT

    This is something I wrestle with as a freelancer of 13 years. I've done dozens of technical implementations, but there's nothing really to look at. Clients want to see examples of work, so what to do? Case studies are one option, but they're time-consuming and not anywhere near as impactful as a screenshot.

    What do you do in these types of situations?

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

    No comments:

    Post a Comment