|
Skiant posted:Related question: You guys think the ES6 modules could help us un-gently caress front-end dev a tiny bit? I'm on the fence about using that plus Babel or Traceur to make that poo poo slightly retro-compatible. Mmmaybe? The more I use ES6 modules, the more I like them.
|
# ? Apr 8, 2015 12:07 |
|
|
# ? May 2, 2024 09:27 |
|
I just want to chime in on the frontend interviewing talk, especially with javascript. Here's my goto question (I'm a team lead where my team exclusively does js pretty much): "You have a page with a button on it. When the page loads, make an api request to example.com/api/whatever?. When you have both the result of the api request and the button has been pressed (these can happen in any order), navigate to google.com." I like this one because it really lets me know if they've worked in javascript before. If they have, I'm going to hear the word 'callback' at least once, something about ajax, and probably window.location.href. It also lets them tell me about setting a variable to keep track of the states of both these things which is some pretty simple logic, as well as being relatively real-world. I dunno it's done a good job of filtering out the bad people so far. ambushsabre fucked around with this message at 12:44 on Apr 8, 2015 |
# ? Apr 8, 2015 12:41 |
|
Thermopyle posted:To help you imagine it, do a project where you only use NPM packages and browserify or webpack. Oh Jesus yes, it was a glorious day to reach that point. I've been running a few training sessions to demonstrate this, and I've been met with a large amount of eyes glazing over. All the NPM dependencies and webpack configurations are daunting, and people are scared of change in general. One guy I work with hasn't really used JS in 10 years and will never come around. I have faith in the rest because all my developer friends have seen the light. Or maybe they just tell me that so I stop recommending React. Skiant posted:I must be in full-blown Stockholm syndrome right now because I'm considering switching from JSHint to ESLint and I'm about to do that in the project's Gulpfile. I stitched to ES Lint recently. I can't remember why. I think it became more popular? I'm a terrible sheep. Babel is great. Independent of ES6, modularizing your code with webpack (or browserify) is a fantastic step forward. Maluco Marinero posted:Yeah, but it results in a deep wasteful dependency tree, what with node_modules just being a giant recurse of dependencies.
|
# ? Apr 8, 2015 13:48 |
|
So why use ESLint instead of JSHint? I switched to JSHint from JSLint because JSLint is way too Crockford, but have had no issues with JSHint.
|
# ? Apr 8, 2015 14:17 |
|
I got this, I use ESLint because....its what the main dev on the primary open-source project I work on uses. drat.
|
# ? Apr 8, 2015 15:00 |
|
I've only used JSHint. Did some digging around and found some stuff comparing it to ESLint. The biggest thing that stands out to me is it sounds like syntax errors will mask the presence of other issues until they're corrected. I have JSHint running constantly via a plugin in SublimeText3, so I'd have to see it in action to decide whether that would bother me or not. I'll give this a shot in the next few days and see how it feels. http://www.sitepoint.com/comparison-javascript-linting-tools/ JS Linting Tool Comparison posted:JSHint Also the author of ESLint talking about it (Note that this post is 2 years old) Introduction from ESLint Author posted:How ESLint differs from JSHint jkyuusai fucked around with this message at 16:07 on Apr 8, 2015 |
# ? Apr 8, 2015 16:03 |
|
quote:ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. In many ways, it is similar to JSLint and JSHint with a few exceptions: Not the most compelling reasons to switch. Don't switch unless you find JS(H|L)int lacking. Edit: beaten
|
# ? Apr 8, 2015 16:05 |
|
I'm such a loving front-end luddite. Gulp with babel and sass, then I... download dependencies from their respective websites and commit them to the repo I dunno. After years of gems, nugets, and other such horseshit adding 18 bajillion dependencies to my projects because developer X just had to have the foreach function from library Y, I wanna concretely know what I'm making my users download. (In most cases knockout, require1k, lie to polyfill promises, my little ajax helper, and sometimes moment)
|
# ? Apr 8, 2015 16:24 |
|
Maluco Marinero posted:
Oh god yes. It's terrible. Browserify and NPM is definitely not a panacea and this is one of the real pain points. Sometimes I have a hard time figuring out what is making my bundle so large...are there any tools for analyzing the bundle to figure that out? In other news, the posts taking about Babel make me want to say that everyone should integrate Babel into their build system as ES6 stuff is pretty great!
|
# ? Apr 8, 2015 16:41 |
|
ambushsabre posted:I just want to chime in on the frontend interviewing talk, especially with javascript. Here's my goto question (I'm a team lead where my team exclusively does js pretty much): I'd be very happy to hear them mention Promise.all https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all
|
# ? Apr 8, 2015 17:36 |
|
Jsx support is enough for me to stay the course. jkyuusai posted:I've only used JSHint. Did some digging around and found some stuff comparing it to ESLint.
|
# ? Apr 8, 2015 19:12 |
|
anyone doing frontend work on windows here? not a popular combination, but there are certainly clients who want websites built to run on windows server.. the big problem i'm running into is npm. certain packages simply cannot be used due to the path length recursion thing. is there some common workaround for this?
|
# ? Apr 8, 2015 23:45 |
|
Gul Banana posted:anyone doing frontend work on windows here? not a popular combination, but there are certainly clients who want websites built to run on windows server.. the big problem i'm running into is npm. certain packages simply cannot be used due to the path length recursion thing. is there some common workaround for this? Are you using NTFS partitions or FAT32?
|
# ? Apr 9, 2015 00:20 |
|
Gul Banana posted:anyone doing frontend work on windows here? not a popular combination, but there are certainly clients who want websites built to run on windows server.. the big problem i'm running into is npm. certain packages simply cannot be used due to the path length recursion thing. is there some common workaround for this? We develop on Windows and have no problems installing NMP packages. Deleting has problems often. Usually kill those with Cygwin.
|
# ? Apr 9, 2015 03:35 |
|
NTFS. You're right that *installing* packages has no issue -this is because npm uses relative paths. But I can't, say, scp the result around, or uninstall them, or work with them in many source control apps (even to gitignore them). Are people just.. living with this?
|
# ? Apr 9, 2015 05:04 |
|
PlaneGuy posted:I'm such a loving front-end luddite. Gulp with babel and sass, then I... download dependencies from their respective websites and commit them to the repo This. I mean they are just scripts right? Create scripts directory, download backbone and its dependencies and put them in the folder. Reference them and off you go. It makes it easy to reason about stuff. Works pretty well.
|
# ? Apr 9, 2015 05:41 |
|
Gul Banana posted:NTFS. You're right that *installing* packages has no issue -this is because npm uses relative paths. But I can't, say, scp the result around, or uninstall them, or work with them in many source control apps (even to gitignore them). Are people just.. living with this? I figured most people using Node.js or NPM just had Macbooks emblazoned with stickers.
|
# ? Apr 9, 2015 05:42 |
|
piratepilates posted:I figured most people using Node.js or NPM just had Macbooks emblazoned with stickers. That's seriously the response I got once - "why aren't you using a Mac?" Node/NPM advocates have replaced offshore DBAs as the focal point of my burning rage towards my career.
|
# ? Apr 9, 2015 05:56 |
|
Gul Banana posted:NTFS. You're right that *installing* packages has no issue -this is because npm uses relative paths. But I can't, say, scp the result around, or uninstall them, or work with them in many source control apps (even to gitignore them). Are people just.. living with this? My I present an actual back and forth between people on a github issue from 2014 about this: "FYI Node (and thus npm) always uses UNC paths internally, before actually calling into the filesystem. It is only third-party tools that have a problem. (Unfortunately one of those third-party tools is Windows Explorer, but, that's Microsoft's bug...)" "Claiming therefore, that Windows supports long paths ... is a(n) entirely disingenuous attempt to misrepresent the actual reality." "I don't really care about whatever word games you want to play around the word "support." Sure, if you wish, all I'm saying is that Node and npm are Windows compatible software that support long paths."
|
# ? Apr 9, 2015 06:24 |
|
Taking a trip down the node_modules rabbit hole for one of your projects is fun. Half of webpack's size is due to a dependency called 'source-map', which is maybe 100kb or so but contains a benchmark suite that has a 16mb file that just appears to be a Scala.js runtime. That still feels weird to me how the modules you could be installing on your servers could contain this huge tree of dependencies that includes other language's transpiled to javascript to write a development artifact (benchmark, tests, etc.). Your project could end up having the same (sub-)dependency with the same version 15 times, each with their own copies of other language's runtimes for doing development work on the dependency itself.
|
# ? Apr 9, 2015 07:05 |
|
piratepilates posted:Taking a trip down the node_modules rabbit hole for one of your projects is fun. Half of webpack's size is due to a dependency called 'source-map', which is maybe 100kb or so but contains a benchmark suite that has a 16mb file that just appears to be a Scala.js runtime. looks like there's a newly-added npmignore for the project that should help, at least: https://github.com/mozilla/source-map/blob/master/.npmignore (see https://github.com/mozilla/source-map/pull/169)
|
# ? Apr 9, 2015 07:16 |
|
Even if node/npm support Windows, most projects I've built from source don't. The build instructions will fail with a useless error message like EACCESS. npm install usually works, but sometimes it takes a few tries. I gave up trying to develop with node on Windows.
|
# ? Apr 9, 2015 07:29 |
|
https://www.npmjs.com/package/flatten-packages may be helpful.
|
# ? Apr 9, 2015 14:51 |
|
Sedro posted:Even if node/npm support Windows, most projects I've built from source don't. The build instructions will fail with a useless error message like EACCESS. npm install usually works, but sometimes it takes a few tries. I gave up trying to develop with node on Windows. I had the same issues. I tried to setup a dev environment for node on my desktop thinking that it would be more comfortable but the amount of hassle isn't worth it. Instead I just slouch and drink single origin espresso straight out of a chemex glass while covering my 2006 MBP in ember stickers.
|
# ? Apr 9, 2015 15:37 |
|
I gave up doing any kind of development on Windows except for Visual Studio stuff a long time ago. Now I develop in a virtual machine running Ubuntu. The whole setup works great. At the time I switched it wasn't because of Web dev, but still...
|
# ? Apr 9, 2015 16:07 |
|
Thermopyle posted:I gave up doing any kind of development on Windows except for Visual Studio stuff a long time ago. I'm still getting used to using VIM but once its more natural, I'm thinking about switching all of my personal dev to my play servers and just using VIM on there.
|
# ? Apr 9, 2015 16:34 |
|
mpaarating posted:I'm still getting used to using VIM but once its more natural, I'm thinking about switching all of my personal dev to my play servers and just using VIM on there. This is probably a good idea. I love Visual Studio so I'll always be running Windows in some form, but having a VM open with vim is the way to go I think.
|
# ? Apr 9, 2015 16:45 |
|
I use Windows for all my modern web development and everything is great. Sometimes long paths make deleting a project require a special utility, but everything runs fine. Visual Studio with the Node tools is excellent.Gul Banana posted:NTFS. You're right that *installing* packages has no issue -this is because npm uses relative paths. But I can't, say, scp the result around, or uninstall them, or work with them in many source control apps (even to gitignore them). Are people just.. living with this? .gitignore is just a text file... Open it up, put "node_modules" on a line, and you should be set.
|
# ? Apr 9, 2015 16:54 |
|
mpaarating posted:I had the same issues. I tried to setup a dev environment for node on my desktop thinking that it would be more comfortable but the amount of hassle isn't worth it. Instead I just slouch and drink single origin espresso straight out of a chemex glass while covering my 2006 MBP in ember stickers.
|
# ? Apr 9, 2015 17:28 |
|
I work on Windows, mostly with Sublime Text + a git-bash window wrapped in Console, and I'm not really encountering any major issue. I'm also trying out WebStorm at work right now and I have to admit I really like it. If my new work (I switch early may) doesn't have strong feelings about one or the other, I'll probably buy myself a licence.
|
# ? Apr 9, 2015 18:37 |
|
Skiant posted:I work on Windows, mostly with Sublime Text + a git-bash window wrapped in Console, and I'm not really encountering any major issue. Me neither. I think it's really only these mega-frameworks that are doing this since they pull in a lot of dependencies that depend of things that depend on things, etc. My pet peeve is when someone writes a server-side or dev depencency and cherry picks parts of a library (like lo_dash), but each part of that is depends on a core bit and that gets duped for every import. if it's not being sent to the user, who gives a poo poo if you save 12K not importing some things (but not really because of the dupes)? I mean, yeah it doesn't have much to do about the windows long path thing, but it's a symptom of not giving a poo poo what your dependencies are, which can cause those kind of problems. Spraynard Kruger posted:.gitignore is just a text file... Open it up, put "node_modules" on a line, and you should be set. A.B.C. Always Be Committing except node_modules just let the dev type npm install edit: another reason to be aware of your dependencies... if your dependency doesn't put a fixed version for its dependencies, you might actually get wildly different versions amongst devs PlaneGuy fucked around with this message at 21:55 on Apr 9, 2015 |
# ? Apr 9, 2015 21:51 |
|
PlaneGuy posted:edit: another reason to be aware of your dependencies... if your dependency doesn't put a fixed version for its dependencies, you might actually get wildly different versions amongst devs That's a good reason to use npm shrinkwrap.
|
# ? Apr 9, 2015 22:24 |
|
Sedro posted:Ember is one of those projects that won't build on windows Works on my machine. Well, Ember CLI, to be precise.
|
# ? Apr 9, 2015 22:46 |
|
Stoph posted:That's a good reason to use npm shrinkwrap. aw snape! if my last place of employment knew about that there would've been a lot less swearing. Good to know.
|
# ? Apr 9, 2015 23:34 |
|
We got an Angular site shipped from some external contractor. I've been trying to hack on it to add simple functionality and it's the most insane thing I've ever done. Angular is an incomprehensible mess and I can't figure out how to do anything in it.
|
# ? Apr 10, 2015 01:49 |
|
Suspicious Dish posted:We got an Angular site shipped from some external contractor. I've been trying to hack on it to add simple functionality and it's the most insane thing I've ever done. Yeah I found Angular really difficult to wrap my head around. I've found React is much more... sensible?
|
# ? Apr 10, 2015 01:57 |
|
Suspicious Dish posted:We got an Angular site shipped from some external contractor. I've been trying to hack on it to add simple functionality and it's the most insane thing I've ever done. They all are, here is hoping the next generation fairs better. TodoMVC is pretty good at showing what a mess the situation is.
|
# ? Apr 10, 2015 02:01 |
|
React seems very similar to how I would design my own system, which is a system composed of a tree of widgets that "render" to DOM. Angular seems to be all about data binding of strings to a premade DOM, which is impossible to do anything semi-complex with.
|
# ? Apr 10, 2015 02:08 |
|
Suspicious Dish posted:We got an Angular site shipped from some external contractor. I've been trying to hack on it to add simple functionality and it's the most insane thing I've ever done. uh, I doubt it has anything to do with Angular being bad. It's more likely that they wrote a complete piece of garbage. I've seen places write completely angular apps that would just be stupid no matter the js framework. My company is currently converting a C# desktop app into an Angular/Java app and it has gone really well thus far (8+ months into it). What types of issues are you having?
|
# ? Apr 10, 2015 02:40 |
|
|
# ? May 2, 2024 09:27 |
|
mpaarating posted:uh, I doubt it has anything to do with Angular being bad. It's more likely that they wrote a complete piece of garbage. I've seen places write completely angular apps that would just be stupid no matter the js framework. My company is currently converting a C# desktop app into an Angular/Java app and it has gone really well thus far (8+ months into it). No, angular is pretty bad when measured on the comprehensibility-to-someone-who-hasn't-learned-it scale.
|
# ? Apr 10, 2015 02:43 |