6 ms·
No frameworks, no boilerplate - this is a great idea. I've seen too many junior developers go straight into learning React/Redux, or using bootstrap, or pluggin
by johnomarkid 10y ago
No frameworks, no boilerplate - this is a great idea. I've seen too many junior developers go straight into learning React/Redux, or using bootstrap, or plugging in some library like velocity.js. It's often easier, more efficient, and more maintainable to use plain javascript with web APIs.
- globuous 10y agoVery true. I remember wanting to throw my computer out the window when I had errors relative to this, pass by ref, or when a callback gets called when learning js through react/redux. But I think react is what motivated me to learn js in the first place, so it goes both ways. Indeed, I think the best way to learn a coding is motivation. And the best motivation is making something you cherish. To me, it was a music web app I'm still working on. I had tried to learn JS many times in the past and had never succeeded. React allowed me to structure my code (the wrong way at first, I had everything in react components not just view logic, but gave me structure none the less) and think about my UI in an object manner. Moreover, this way, I ran into problems, looked for solutions and learned this way. As opposed to learning solutions and finding problems they solve. Little by little I got to see why I might need react-router and redux. Redux made my life so much easier (no need to pass state in a hierarchical way anymore, any component can read and modify state of other components regardless of relative tree position, and in a safe explicit way). After a year of having learned frontend this way, I consider myself a js coder. I made a fairly simple website the other day (just django + jquery) I'm kinda proud of. This web app was the first and only web project I had ever done, and this jquery website was done in a couple days. My third ever project (I'm working on it as I'm writing this) is a cfd solver in js using web workers and SIMD for the solver and react/redux/d3 for the frontend. I've tried to learn to code so many time to be able to spin up projects like this (in this case, to review and practice my cfd, not build airplanes), and I was never able to because I never had the motivation to finish learning about ifs and loops of whatever language whenever I started reading a book about it. The hardest thing about learning js through react is that a js beginner wants to user JSX. I came from HTML (a whiiiile ago), so it made (and still makes) sense for me to use JSX (and it made zero sense to me not to use it). The problem of course, is that I had to introduce myself with babel and browserify (because even the latest Safari doesn't understand JSX). But once that's set up, you've already understood about npm and compilation. So you pretty much already know how to use ES# or SASS if you want to use it. And minifying is just a few lines of code and SO answers away. I guess this has become the story of "how I learned to code", but I wanted to share how starting with a "it's too complex for a beginner" project and jumping straight into react/redux and skipping over vanilla could be beneficial if one has the motivation to finish the project but not the attention span to go through vanilla beforehand. Because one will have to learn vanilla to succeed at anything anyway, but by making stuff you really care about at the same time in this case. Btw, I think what got me to say "fuck it, I'll jump straight into react and build shit, fuck all these tutorials" was that I read a while ago a quote about the tumblr guy saying something along the lines of "the only way to learn to code is to make a project you care about" and my older brother telling me "learn django, you'll be able to make websites and you'll have learned some python at the same time" (he's an experienced coder knowing I was not).
- marmaduke 10y agoIsn't SIMD a little overkill for a prototype? I mean, unless you already know how to write the data and solver amenable to SIMD ops, it can be some work..
- JustSomeNobody 10y agoTo their credit, the not so junior developers are constantly telling them that they HAVE to learn React. Pick any Javascript forum on the internet, even HN comments, if you'd like. The common comment is "Just use React".
- egeozcan 10y agoNot to mention the influx of medium posts telling them if they specialize on one single framework, they can get a job after a few months of training. The interesting thing is they are not lying: You'll get a job which will last until the new library de jour arrives. Maybe this is how the job market answers the high demand. I personally have no idea.
- 6DM 10y agoI mean, they'll at least have the job until the project is finished. You're boss probably won't care if another framework comes out. Then there's all of the legacy applications that will need support. There's an entire market for that. In the meantime you can learn something new :)
- at-fates-hands 10y ago>> There's an entire market for that. I can confirm this. I work in a large corporate environment and we're rebuilding a legacy application in Angular 1.4. They have no plans of migrating and even talk of moving to 1.5 or even 2.0 I've been told migrating to either 2-3 years away.
- wwweston 10y ago>> In the meantime you can learn something new :) The problem I've come to have with this as I get older is... I realize that I have a limited amount of time to learn new things. I still love doing it, but if possible, I'd rather spend that effort on learning portable, enduring, and broadly applicable things than ephemeral arcana involved in learning to do essentially the same thing a different/"modern" way. New learning should be for new capabilities, a better quality of insight, and real advantages.
- FLUX-YOU 10y agoNow just remove the framework requirements from all of the job descriptions so the people hiring and the people working are all on the same page about how work is actually done.
- chrisan 10y ago> I've seen too many junior developers ... using bootstrap Bootstrap solves a different problem than jquery. Most developers hate designing (OK most developers I know...) and use bootstrap just to get something halfway decent looking and focus on javascript rather than design/css/quirks.
- faitswulff 10y agoAt the same time, Bootstrap does include just enough javascript, for animations and the like, to make things enticing and confusing for beginners. I can't think of them off the top of my head, but I believe some features of Bootstrap are even broken without it.
- chrisan 10y agoFair point. The "jQuery plugins" obviously require (and promote) jQuery: http://getbootstrap.com/javascript/ http://getbootstrap.com/javascript/ The rest of Bootstrap is just css however.
- kylestlb 10y agoI think I might disagree on 'maintainable' depending on your definition. For instance, ever since picking up TypeScript my projects have been much easier to maintain. I'm sure the same would apply with a templating framework, depending on your needs...
- sondr3 10y agoHow quickly after learning JavaScript should one consider learning TypeScript? I've used JS for a while now (two-three months) and want to try TS but at the same time not jump ship too quickly.
- andreapaiola 10y agoFor me it was very easy... like javascript strict-mode with type variables...
- Stratoscope 10y agoYou won't be jumping ship at all. Everything you know about JavaScript applies directly to TypeScript. It's a superset of JavaScript. You can even take your existing JavaScript code and start adding TypeScript annotations to it a little at a time.
- squeaky-clean 10y agoTypescript is great because it can be gradually added. It's just additions on top of JS, so if you're writing any JavaScript, you're already writing compatible TypeScript (the types just default to "Any"). Then you can add type definitions wherever you like. The whole codebase, or just a few functions that are often confusing (like that damn function which is expecting a "YYY-MM-DD" string instead of Date object). You only realize most of the benefits though when working on a large/complex project, or on a team where you're not responsible for most of the codebase, or other scenarios where it's hard to keep the entire project "in your head" at once. If you're just using JS to add autocomplete, pagination, other simple things to a page, then TypeScript may just be unnecessary effort. Basically, how often do you end up with a bug because of improper types. Or how much time do you spend looking up what type you need to use somewhere. TypeScript is worth it when the time spent on those issues is greater than the time spent learning TypeScript (which isn't very much).
- jorblumesea 10y agoNot really. JS has no true concrete design patterns, no built in state handling, no built in tooling. Going straight into React/Redux isn't the best, because you miss out on learning JS fundamentals, but it will produce a far more maintainable project due to the assumptions it makes and enforces. It also makes it easier for others to just jump in and make changes, given that they know x or y framework. You could not know any vanilla js and still probably make more long term maintainable code just based on how the framework is designed. Vanilla js would require the engineer to set patterns and make assumptions, something that junior devs might do incorrectly. You will reinvent the wheel and probably do it inefficiently unless you are a seasoned vet. Not only that but others who are not familiar with whatever homebrew stuff you have cooked up will not be able to just dive in and start putting pieces together without a fair amount of reading. It's not impossible, but hard with a large dev team. This is why frameworks exist, no? Don't get me wrong I hate the framework bloat and pace of frontend engineering but these frameworks do serve a very legitimate purpose. But this definitely goes against the JS hate trends as of late.
- z3t4 10y agoyou also put on a backpack that cant be taken off. So once you no longer need it or want to put on another, it becomes a burden.
- jorblumesea 10y agoI'm not saying it's a silver bullet, and it should not be treated like one. But everyone here is a fairly experienced dev. Working with junior devs is difficult, especially frontend devs who usually lack comp sci fundamentals. Frameworks provide structure to what would normally be an absolute spaghetti mess, even at the cost of overhead. I would rather have bloated but maintainable code. It's hard to even unit test vanilla js properly. Those who rail against the current framework world forget how bad the vanilla world was...spaghetti code, no real design patterns, terrible class design, no standard lib...the list goes on :( It's frustrating that the counterpoint to the "framework everything" crowd is the "never framework" pattern. Both are bad for different reasons right? I would never want 10+ devs working on the same project without some kind of framework, either homebrew or open source. But also running react for your tiny little dev blog is equally bad.
- nrjdhsbsid 10y agoNonononono this is a horrible idea. Vanilla js is the whole reason all these frameworks were created. I guess if you don't care about the 1000+ hacks and workarounds to make your code everywhere you're right. Might as well call it "vanilla chromescript" if you're going that route. Outright rejecting everything that was built for a good reason is worse than covering up bad skills with a bunch of libraries. At least the libraries actually work
- wyclif 10y agoIn fairness to Wes Bos, he says right on the landing page that "these things are great and often needed, but can obstruct learning and constrain initial understanding."
- wattt 10y agoKeep in mind we're not talking just about JS on the web running in web browsers. It runs on servers. It runs as standalone applications. If you are targeting a non-web environment you're not writing for quirks of different browsers, you know the runtime environment you are targeting explicitly. It isn't that bad.
- JustSomeNobody 10y agoBut devs should have a firm understanding of Vanilla JS so that when (not if, but when) they need to do something the framework designer never thought of, they'll be able to develop a workable solution.