|
Data Graham posted:What's everybody's opinion of CoffeeScript? A crutch for the weak, or the only way to do rich apps with closures and optional parameters without going totally nuts? Someone didn't like some of the warts JS has, so they wrote something that has different warts and requires an additional build step.
|
# ? Jul 1, 2015 18:50 |
|
|
# ? May 9, 2024 00:30 |
|
I think with ES6, Coffeescript is pretty much overkill. I guess you can use it if you like enforced indentation.
|
# ? Jul 1, 2015 19:12 |
|
Lumpy posted:Someone didn't like some of the warts JS has, so they wrote something that has different warts and requires an additional build step. Yeah, its attempts to fix JS quirks like scope/hoisting mostly made it more convoluted. If you're already adding another build step, just use Babel to write ES2015 and use stuff like arrows, classes, and template strings natively (well, eventually).
|
# ? Jul 1, 2015 19:12 |
|
template strings are the best
|
# ? Jul 1, 2015 19:23 |
|
Data Graham posted:What's everybody's opinion of CoffeeScript? A crutch for the weak, or the only way to do rich apps with closures and optional parameters without going totally nuts? It's a palliative for Ruby programmers so they don't have to feel like they're coding JavaScript when they're coding JavaScript. For any programmer worth their salt It's a needless abstraction and distraction.
|
# ? Jul 1, 2015 19:30 |
|
give me curly braces or give me death Interestingly, I learned recently that jQuery originally didn't use curly braces, but Resig quickly backtracked on that once it became apparent that they are rather useful for organization
|
# ? Jul 1, 2015 19:41 |
|
If you're going to choose a transpiling language and it isn't TypeScript* then you've already made a weird decision or just really can't stand Javascript. Comes along with most of the nice ES6 improvements, with the secret sauce of optional typing. *except for Elm or ClojureScript as special cases
|
# ? Jul 1, 2015 19:45 |
|
I just figured out AWS' SES service for sending out e-mails via SMTP in Python, so now I need to figure out how to expose this new "send an e-mail" functionality to the clientside of things in a REST-oriented way. Right now I'm thinking about making an endpoint, something like /v1/api/admins/send_notification/<template ID>. The idea is, there are three different types of notices to send out, and the client just needs to specify which notice (template) to use. Provided the POST call passes authentication and authorization, the server would then handle preparing and sending out e-mails based on the specified template as it's defined on the server. Afterwards it'll probably return the number of e-mails sent, or some other kind of object of success:failure messages indicating that SOMETHING happened. Is there a better way of going about this?
|
# ? Jul 1, 2015 20:27 |
|
my bony fealty posted:jQuery originally didn't use curly braces, but Resig quickly backtracked on that once it became apparent that they are rather useful for organization
|
# ? Jul 1, 2015 20:27 |
|
my bony fealty posted:Interestingly, I learned recently that jQuery originally didn't use curly braces, but Resig quickly backtracked on that once it became apparent that they are rather useful for organization
|
# ? Jul 1, 2015 20:41 |
|
I hated coffeescript in the beginning, but I've discovered that it really speeds up development by shorthanding everything once you get the hang of it. besides not using/requiring all the various braces, I'd say the one thing I like best about it that es6 doesn't do is the implied comma when making an object/array. I wish es6 would find a way where that could be added in, but it would probably cause breaking changes if they were to add it. Ruby devs have ruby'd it up big time though, so I tend to avoid a wide portion of the "improvements" that coffeescript has introduced. Stuff like "unless" and swapping the if statement to be at the end of a line to make it "more English" are imo some of the dumbest poo poo anyone has added to a language. e: Also I looked at LiveScript today and it looks like complete garbage in comparison.
|
# ? Jul 2, 2015 03:51 |
obstipator posted:Ruby devs have ruby'd it up big time though, so I tend to avoid a wide portion of the "improvements" that coffeescript has introduced. Stuff like "unless" and swapping the if statement to be at the end of a line to make it "more English" are imo some of the dumbest poo poo anyone has added to a language. *Perl slinks out of the room*
|
|
# ? Jul 2, 2015 05:21 |
|
I've been using CoffeeScript, Jade and Stylus lately and like them because they make code "cleaner" once you learn them but I find myself using js2.coffee and converters pretty often to check myself so am I saving time?
|
# ? Jul 2, 2015 05:38 |
|
TIL code:
Chrome eagerly downloads prefetches before the current page's assets. Safari does nothing, which is actually an improvement. Firefox waits until the current page is loaded , then only downloads 1 or 2 of my 15 links. IE11, miraculously, does everything perfectly.
|
# ? Jul 2, 2015 06:25 |
|
Does anyone have any thoughts about best practices for a US State field on an address input form? Most forms seem to have a select input, but I was just sitting here thinking that a field just does real-time-ish validation on a text field seems better. When I'm typing my address into a form, I breeze through it quickly by tabbing between fields...it seems like changing from a series of text fields to a select box breaks up the flow of "type in field, hit tab, type in field, hit tab, type in field, hit tab". I mean, I realize that usually a select box will select the characters a person types in when its focused, but I'm just thinking the visual switch is more jarring and I'm not sure what you gain by using a select box in this instance. People know what state they live in.
|
# ? Jul 5, 2015 16:41 |
|
Thermopyle posted:Does anyone have any thoughts about best practices for a US State field on an address input form?
|
# ? Jul 5, 2015 16:46 |
|
Thermopyle posted:Does anyone have any thoughts about best practices for a US State field on an address input form? I have always wondered why, if you asked for my zip code, you need to ask me for my state.
|
# ? Jul 5, 2015 17:09 |
|
Lumpy posted:I have always wondered why, if you asked for my zip code, you need to ask me for my state. I love websites that auto-fill the state for you
|
# ? Jul 5, 2015 17:58 |
Lumpy posted:I have always wondered why, if you asked for my zip code, you need to ask me for my state. I think in some rare cases a zip code can span multiple states
|
|
# ? Jul 6, 2015 23:55 |
fletcher posted:I think in some rare cases a zip code can span multiple states Having implemented many a zip code db lookup interface / reverse geocoding deely, I would love to know if this is a real thing.
|
|
# ? Jul 7, 2015 00:13 |
|
Data Graham posted:Having implemented many a zip code db lookup interface / reverse geocoding deely, I would love to know if this is a real thing. All my Googlin' leads me to believe the answer is yes, but its very rare.
|
# ? Jul 7, 2015 00:18 |
|
I would categorize it as rare enough that anybody in that spot is already used to it. Zips change all the time but the state level designation hardly ever does. It shouldn't be much trouble to get a zip:state mapping (first 3 digits should be all you need), set it once and be done with it.
|
# ? Jul 7, 2015 00:33 |
|
With a zip code there's the problem that this system isn't internationally portable, so just doing a lookup table of digits=>state, even with multiple options, fails completely when you start looking up things like UK post codes. Because of this a lot of systems just reject the idea of trying to figure it out automagically and let the user type in a few extra digits to save development costs. Most of the ones that try to roll their own soon find its a lot more complicated than they thought it was. It's not that hard to implement an internationally compatible lookup using the Google Geocoding API, it's just a little slow (because AJAX) and occasionally unreliable (There are a lot of results for "Oxford"). Sometimes that can muddy the UX and get in the way, but there are still ways to make it work without irritating your visitors if their address isn't found in a lookup, or they're half way through typing an address when the lookup comes back. Then there's the problem of which order your fields appear in. Most of the time they follow the format of a letter, which is <number> <street>, <province>, <state>, <zipcode>, <country>, but that's rear end-backwards for a lookup. You could put Country and then Zipcode first to narrow the results, but that's pretty weird. Conveniently the Geocoding API (IIRC) can have a stab at the full address based on the street and province, so that's another option. Now can someone tell me why I have to select between VISA and MasterCard in a dropdown after I put in my credit card number. v1nce fucked around with this message at 00:58 on Jul 7, 2015 |
# ? Jul 7, 2015 00:54 |
Okay, cool. So it's stuff like weird pseudo-towns that straddle state borders, like military bases (Fort Campbell, KY/TN). Interesting.
|
|
# ? Jul 7, 2015 01:47 |
|
I'm working on a new site, what is the latest/hipsteriest frontend framework now? http://www.getmdl.io ? I'm looking to specifically not use bootstrap/pure/foundation
|
# ? Jul 7, 2015 02:08 |
|
I hate on lazy frameworks as much as the next guy, but if you're going that route why not pick the best supported? Chop up Foundation, it won't break but you won't be a slave to it.
|
# ? Jul 7, 2015 02:33 |
|
Oh nah, I'm not hating on any of them, I just want to use something different for a change pretty much. Probably sounds dumb.
|
# ? Jul 7, 2015 03:21 |
|
Biowarfare posted:Oh nah, I'm not hating on any of them, I just want to use something different for a change pretty much. Probably sounds dumb. Not dumb. This is how I find all sorts of cool stuff.
|
# ? Jul 7, 2015 06:11 |
|
quote:States! Please stop asking me for a "state or provice" when I'm living in a country that does not use them as part of their postal system. Forcing a user to mangle his/her address to a format that is illogical and foreign just to satisfy some database schema you brewed up is just stupid from the user's perspective.
|
# ? Jul 7, 2015 06:41 |
|
Loezi posted:Please stop asking me for a "state or provice" when I'm living in a country that does not use them as part of their postal system. Forcing a user to mangle his/her address to a format that is illogical and foreign just to satisfy some database schema you brewed up is just stupid from the user's perspective.
|
# ? Jul 7, 2015 07:00 |
|
Select your region: o_o -_-
|
# ? Jul 7, 2015 12:41 |
|
Is there a current "best" animation/video format based on compatibility with browsers, mobile devices and responsive design for a smallish, 2-3 second animated logo/graphic that I'm converting from an FLV? MP4, GIFV, WEBM, something else? It's going into a Bootstrap-themed site if that matters.
|
# ? Jul 7, 2015 15:55 |
|
Biowarfare posted:Oh nah, I'm not hating on any of them, I just want to use something different for a change pretty much. Probably sounds dumb. That's not dumb at all, I was not paying attention and read your question as "first time making a site, want framework but also want to be edgy for no reason". I subscribe to /r/web_dev and /r/freelance (and a lot of other subreddits that people who think 'wordpress theme = developer = $$$' gravitate towards) and that comes up a lot so I have an itchy trigger finger when it comes to that kind of request. If you're doing it for your own self improvement and to explore new things as a person with a background in what actually makes these frameworks work, more power to you. Rubies fucked around with this message at 16:30 on Jul 7, 2015 |
# ? Jul 7, 2015 16:26 |
|
onionradish posted:Is there a current "best" animation/video format based on compatibility with browsers, mobile devices and responsive design for a smallish, 2-3 second animated logo/graphic that I'm converting from an FLV? H.264 encode in an MP4 container has the best cross-browser support right now if you're dead set on just making one file, but it's fairly trivial to also include a webm container to scoop up the last few percent of potential visitors.
|
# ? Jul 7, 2015 16:36 |
|
Munkeymon posted:H.264 encode in an MP4 container has the best cross-browser support right now if you're dead set on just making one file, but it's fairly trivial to also include a webm container to scoop up the last few percent of potential visitors. Comedy option: SVG is fairly well supported too. I still need to learn how to do things in SVG rather than CSS animation fuckery. It's a lot of math I don't want to think about though.
|
# ? Jul 7, 2015 18:02 |
|
SVG with animations/transitions is a good suggestion. Maybe check out D3.js too for more complex stuff?
|
# ? Jul 8, 2015 01:32 |
|
This is going to be a pretty open question, so apologies in advance for the inevitable poo poo storm that will rise as a result. But I've been programming for a few years now (c# mainly) and I'm looking to get into web development and change career paths. The only thing is, I've no idea what aspect of web development to go into. From what I've looked into, there seems to be a million and one ways to build a website and I'm hoping to land a web developer role over in Canada. So my question is this: what would you recommend as the technologies I should learn in order to gain a web development role?
|
# ? Jul 8, 2015 13:08 |
|
Along with a million and one ways to build a website, this begs the question; what do you want to do? Besides "get a job in a new industry", what sort of thing do you hope to be able to do? At ground level for what you're familiar with, there's always ASP .NET C#, but if you're looking to branch out from C# then I guess this applies to you.
|
# ? Jul 8, 2015 13:56 |
|
LabiaBadgerTickler posted:This is going to be a pretty open question, so apologies in advance for the inevitable poo poo storm that will rise as a result. But I've been programming for a few years now (c# mainly) and I'm looking to get into web development and change career paths. Web development is generally split into 'front end' and 'back end' roles (not a hard and fast rule and there are a lot of devs who do both) Front end is the client side, user interaction part - what someone sees and interacts with when they go to a website. This involves HTML, CSS, and Javascript (and the various Javascript libraries & frameworks and CSS preprocessors). Back end is the server side, what the server does with the requests it gets from the client side, which generally involves databases and the like. There are multiple server-side languages you can choose from but the biggest ones are probably PHP, Python, and Ruby. Javascript can also be used for back end now with node.js. I would say that everyone should know HTML and CSS, be familiar and comfortable with Javascript, and from there it's up to you - if you want to do front-end then invest your time in getting really good with HTML/CSS/JS, and if you want to do back end then check out one of the languages mentioned above (I like PHP but that's maybe an unpopular opinion around here ).
|
# ? Jul 8, 2015 14:06 |
|
|
# ? May 9, 2024 00:30 |
|
spacebard posted:Comedy option: SVG is fairly well supported too. That's true, but I've seen some browsers *cough* Chrome *ahem* do a much worse job resizing SVG than video or regular images. That could have been because Inkscape makes bad SVGs or I didn't find some magic CSS trick to make them look like not-poo poo, though. gbaby posted:SVG with animations/transitions is a good suggestion. Maybe check out D3.js too for more complex stuff? Starting with a video and re-encoding in a different format is still going to be a hell of a lot easier.
|
# ? Jul 8, 2015 15:02 |