|
Any reason not to use shortcut funcs like this?JavaScript code:
Dominoes fucked around with this message at 20:33 on Mar 10, 2017 |
# ? Mar 10, 2017 20:28 |
|
|
# ? Jun 6, 2024 05:48 |
|
Dominoes posted:Any reason not to use shortcut funcs like this? It's a fine line between usefully abstracting away parts of the application, and needlessly confusing things. If you are doing it just to save some keystrokes, probably not a great idea. If it provides you with some meaningful abstraction, then it's a good idea.
|
# ? Mar 10, 2017 20:42 |
|
If you're targeting specific ids like 100 times in a file, sure.
|
# ? Mar 10, 2017 20:43 |
|
Dominoes posted:Any reason not to use shortcut funcs like this? I just set up abbreviations in my editor so when I type dgebi it expands to document.getElementById() with the cursor in the parens.
|
# ? Mar 10, 2017 21:17 |
|
Thx. On the spectrum between obfuscation and reducing boilerplate, I think this falls enough towards the latter to make it worthwhile. (Outsider's perspective). Ie, if I see myself repeating a chunk of code many times, I try to break it into a function; this seems like a trivial example of that pattern. Shayl - thanks. I ended up switching most of my Jquery to normal JS with lodash - didn't realize that manipulating elements was straightforward there too. This feels more consistent, while JQuery almost feels like another language inserted. Still using it for tasks involving next/closer etc. Dominoes fucked around with this message at 00:00 on Mar 11, 2017 |
# ? Mar 10, 2017 21:24 |
|
Dominoes posted:On the spectrum between obfuscation and reducing boilerplate, I think this falls enough towards the latter to make it worthwhile. This is my main reason, actually. Why the hell would I reimplement it but without the years of testing? Yeah, editor shortcuts are good for this, but there's other annoying, repetitive junk it papers over like setting every property individually on a new node/xhr. At least C# has nice sugar for that.
|
# ? Mar 11, 2017 00:14 |
|
Anyone have a recommendation for somewhere to host HD video that one can just stream on a site for a fancy landing page background or something? Tried Vimeo Pro, but its utterly fails at delivering 1080p video uninterrupted (and, as far as I can tell, the problem is on their end).fuf posted:Do people use display:flex as a matter of course yet or is support still flaky?
|
# ? Mar 11, 2017 15:43 |
|
Maluco Marinero posted:Yeah, that's fair. As an aside, we pretty much ALWAYS make page sections full width for this reason. If we want to maintain some sort of Grid measure we maintain a Measure Component that handles setting max-width, centering, etc. Just wanted to say the design of that site is cool and all but the header background made me think my monitor was dirty.
|
# ? Mar 11, 2017 16:39 |
|
nexus6 posted:Just wanted to say the design of that site is cool and all but the header background made me think my monitor was dirty. It's caught me out trying to check/clean my monitor on more than one occasion.
|
# ? Mar 11, 2017 21:44 |
|
Ha, I noticed the same thing when he initially posted the link I just didnt say anything.
|
# ? Mar 11, 2017 22:39 |
|
Thermopyle posted:Ha, I noticed the same thing when he initially posted the link I just didnt say anything. It's meant to be soot from in the distillery processes. We didn't do the design, just the development, I tell you the metric ton of little details on this site. Take a look at the button with lines extending out, that extend on hover. Keeping development on budget was challenging.
|
# ? Mar 11, 2017 22:58 |
|
Does anyone else loath the process of moving a website from local to live? I did it once with Django and now I'm trying with a Flask website and I feel like it shouldn't take me this many hours to setup. I've had issues every single step of the way.
|
# ? Mar 12, 2017 22:39 |
|
huhu posted:Does anyone else loath the process of moving a website from local to live? I did it once with Django and now I'm trying with a Flask website and I feel like it shouldn't take me this many hours to setup. I've had issues every single step of the way. I use a variant of this. code:
|
# ? Mar 12, 2017 23:42 |
|
How lovely deploying dynamic websites is is a big reason heroku came into existence.
|
# ? Mar 13, 2017 00:06 |
|
Thermopyle posted:How lovely deploying dynamic websites is is a big reason heroku came into existence. As you know, I am an idiot, but I always found getting a server up and a site deployed easier than Heroku.
|
# ? Mar 13, 2017 00:22 |
|
Lumpy posted:As you know, I am an idiot, but I always found getting a server up and a site deployed easier than Heroku. Same, but I've spent a lot of time (and was willing to) on my provisioning strategy for my Linodes, but many people don't really wanna do that, and Heroku is great for that.
|
# ? Mar 13, 2017 00:50 |
Maluco Marinero posted:Same, but I've spent a lot of time (and was willing to) on my provisioning strategy for my Linodes, but many people don't really wanna do that, and Heroku is great for that. And Dokku works really well if you want something cheaper.
|
|
# ? Mar 13, 2017 02:16 |
|
The head of our web dev department thinks that "mobile first" is just a buzz-word and isn't an actual thing.
|
# ? Mar 13, 2017 16:09 |
Make Mobile Great Again
|
|
# ? Mar 13, 2017 17:17 |
|
I don't understand how people deploy Django to services that don't have deploy hooks. Doing it manually made me lose my mind.
|
# ? Mar 13, 2017 17:25 |
|
ufarn posted:I don't understand how people deploy Django to services that don't have deploy hooks. Doing it manually made me lose my mind. Do it once then save the commands as a shell script?
|
# ? Mar 13, 2017 17:43 |
|
Lumpy posted:As you know, I am an idiot, but I always found getting a server up and a site deployed easier than Heroku. With heroku this is literally all you do to deploy a new site. code:
|
# ? Mar 13, 2017 17:44 |
|
Thermopyle posted:With heroku this is literally all you do to deploy a new site. For some reason I always get all sorts of errors and issues the times I've tried to install / use Heroku. Something doesn't work, then their documentation falls apart with outdated poo poo and conflicting advice. I'm just lucky I guess.
|
# ? Mar 13, 2017 17:55 |
|
Lumpy posted:For some reason I always get all sorts of errors and issues the times I've tried to install / use Heroku. Something doesn't work, then their documentation falls apart with outdated poo poo and conflicting advice. I'm just lucky I guess. Or maybe I'm just the lucky one! I can't say I've ever had any problems with their stuff yet. I like using them rather than rolling my own anymore because maintaining servers is not my idea of enjoyable.
|
# ? Mar 13, 2017 18:00 |
|
Thermopyle posted:With heroku this is literally all you do to deploy a new site. Yes, once you have configured your app for Heroku and it's completely different than dev config for for DB and static file handling to another domain like S3 which you then have to manage additional scripts for. I used to think Heroku was helpfully abstracting away Ops work for me, but after the initial pain of deploying and setting up secondary configuration for Heroku, static files SSL configuration, database migrations etc, I didn't feel it was worth the additional monthly cost. Heroku felt like its own mini-ops discipline I didn't feel like getting too comfortable with compared to just understanding linux ops better. If Heroku we're cheaper than a potential 10X or higher compared to other hosts, I would probably consider it.
|
# ? Mar 13, 2017 18:01 |
|
Ahz posted:Yes, once you have configured your app for Heroku and it's completely different than dev config for for DB and static file handling to another domain like S3 which you then have to manage additional scripts for. Ehh, I think you're overselling the difficulty there. Your DB config should be stored in an environment variable or something no matter where you're deploying so that's a non-issue. Same thing with S3...I mean, your dev config isn't going to push to S3 even if you're running your own servers is it? I guess if you're going to server your own static files (though heroku python best practices now have you serving straight from heroku except for user-uploaded media), there's a difference there, but you should have separate dev and production configurations anyway so I'm not sure you're really saving anything here.
|
# ? Mar 13, 2017 18:07 |
|
Heroku's super-easy. There is (was?) an alternative called OpenShift... that was a PITA!
|
# ? Mar 13, 2017 18:50 |
|
Thermopyle posted:Ehh, I think you're overselling the difficulty there. Perhaps, just as you understated. code:
It's all about priorities of course, but I found that designing a fairly robust application architecture has brought me to a point where I don't need to worry about routine ops problems that Heroku claims to solve. Sure you avoid occasional db or server patching, but it still doesn't avoid app maintenance either way which is likely the bulk of real ops work and maintenance code updates. Again, that being said, I would probably use Heroku if it was much closer in price to what I'd get in a Linode vm + some extra $ for the convenience.
|
# ? Mar 13, 2017 18:52 |
|
Ahz posted:Perhaps, just as you understated. Well, I think we're going to have to agree to disagree here because I don't really want to spend my time white knighting heroku here, but I think you'll find that I wasn't understating anything as if you design your app with modern best practices, deplying to heroku is just like what I said. edit: That may have sounded sounded more harsh than I intended. I was trying to whip it out real quick before I stepped away from my desk. Sorry. Thermopyle fucked around with this message at 20:10 on Mar 13, 2017 |
# ? Mar 13, 2017 20:03 |
|
I take back what I said about Heroku; once you've figured out its subtleties, it's easy (As Ahz implied), but it's sensitive to certain config variables, database configs, static configs, etc; A disproportionate amount of my commits are titled "Heroku troubleshooting", since there's a lot of trial+error involved when the program works locally, but fails when deployed.
|
# ? Mar 13, 2017 20:15 |
|
Dominoes posted:I take back what I said about Heroku; once you've figured out its subtleties, it's easy (As Ahz implied), but it's sensitive to certain config variables, database configs, static configs, etc; A disproportionate amount of my commits are titled "Heroku troubleshooting", since there's a lot of trial+error involved when the program works locally, but fails when deployed. I think that just like with a regular server setup there's a learning curve. The question is not so much how "hard" it is for your first few project, but how easy it is on your 30th project.
|
# ? Mar 13, 2017 20:22 |
|
Are you guys still talking about deployment? At the agency I work at we just
|
# ? Mar 13, 2017 22:38 |
|
nexus6 posted:Are you guys still talking about deployment? At the agency I work at we just Heroku is it's own thing, basically an abstraction layer that means you don't have to deal with setting up Apache or MySQL(instead you configure Heroku, what an upgrade). It's really expensive and not worth it, especially for an individual. Maintaining a web server should be a tool in every web dev's toolbox. NewForumSoftware fucked around with this message at 23:22 on Mar 13, 2017 |
# ? Mar 13, 2017 23:19 |
|
How do I deploy without Heroku? ELI5.
|
# ? Mar 13, 2017 23:29 |
|
Dominoes posted:How do I deploy without Heroku? ELI5. It depends entirely on what it is that you are deploying and every single solution sucks in entirely different ways that nobody is ever satisfied with. Stick with what you know and what works until you are given a compelling reason to change, like it not actually working or costing too much money/time/effort/sanity.
|
# ? Mar 14, 2017 00:56 |
|
The only thing I don't like about Heroku is that handling file uploads takes some additional work and tends not to play well with out of the box file uploading libraries. Otherwise, it's been a dream for my purposes (small client work where I'm usually the opsy person as well as a developer).
|
# ? Mar 14, 2017 01:20 |
|
You should all just use Visual Studio publishing to publish to an IIS server that has Web Deploy installed. Once your environment is set up initially, publishing is literally a one click operation. Edit: Jesus I never thought I'd say "Hey use this Microsoft product that I think is superior to all your fancy open source things." ModeSix fucked around with this message at 17:46 on Mar 14, 2017 |
# ? Mar 14, 2017 17:43 |
|
Is regular old Visual Studio a reasonable tool to use for general Web Dev? I've used it with MCV ASP.NET applications years back, but never for HTML/Javascript/etc before. And doesn't deploying via that method limit you to using a Windows box for your webserver?
|
# ? Mar 14, 2017 19:04 |
|
Warbird posted:Is regular old Visual Studio a reasonable tool to use for general Web Dev? I've used it with MCV ASP.NET applications years back, but never for HTML/Javascript/etc before. And doesn't deploying via that method limit you to using a Windows box for your webserver? Take a look at Visual Studio Code, it's a free, pared down IDE aimed specifically at HTML/JavaScript/TypeScript development.
|
# ? Mar 14, 2017 19:15 |
|
|
# ? Jun 6, 2024 05:48 |
|
Warbird posted:Is regular old Visual Studio a reasonable tool to use for general Web Dev? I've used it with MCV ASP.NET applications years back, but never for HTML/Javascript/etc before. I use Visual Studio for C# and Visual Studio Code for Javascript. I think this is fairly normal.
|
# ? Mar 14, 2017 19:19 |