6 ms·
My "real" advice for impatient programmers: just start programming, and every time you encounter a problem google it. Don't know how to setup node.js? Google s
by armchairhacker 5y ago
My "real" advice for impatient programmers: just start programming, and every time you encounter a problem google it.
Don't know how to setup node.js? Google should lead you to `npm init` or a starter. Getting some weird syntax error? Google it. Once you learn the basics, want to do X? Google it and determine a) how to do X, or b) if X can't be done / is bad practice.
Just by diving head-first into whatever you're trying to accomplish (or a toy project if you just want to learn), eventually you'll start to get the hand of syntax, libraries, and general programming style. But read articles every once in a while on best practices so you aren't learning the "wrong" way to do things.
The big drawback is that there are a lot of Google results that are outdated, novice, or flat-out wrong. You have to really learn how to do research on the internet. But this is a skill you should learn because you can apply it to anything. My general advice: consult official docs whenever possible; Stack Overflow is reliable but check the answer's comments to see if it's outdated; use Reddit to compare X vs. Y; try to avoid long wordy articles on bloated sites, generally the better the writer = the better the article and more likely it's accurate.
- threatofrain 5y agoI'd also add my own 2 cents: if you're Googling stuff related to syntax then make MDN your first stop; or you might consider one of MDN's many entry points to learning JS. Also check out prominent Discords/Slacks/etc because it's nice to have human help when you're blocked, and sometimes you need opinions rather than facts.
- malshe 5y ago> "My "real" advice for impatient programmers: just start programming, and every time you encounter a problem google it." In my experience, this is a terrible advice. However, many of my students follow this advice over my protests and only a handful of them actually learn anything at the end of a long masters program.
- bruce511 5y agoI agree. But over the years I've come to understand there are two kinds of learners; a) "I learn what I need to accomplish this task". This is observed as question/answer and only the simplest version of the answer is needed. So something like "how do I create a variable x and assign 10 into it. All he's looking for is x = 10 b) The second kind wants to understand the nuance of what's happening, so they can apply that nuance to future code. They are looking for an answer, but the are interested in the working that leads to the answer. So in the above example they want x = 10 var x = 10 let x = 10 options{x:10} and so on. They digest when to use one and when to use another, and they delight in using the correct form in the correct place. In my experience (a) programmers will get through tasks quickly, but with shallow understanding. They will eventually have all the tools, but lack the ability to see the big picture. They struggle to read other people's code. On the other hand (b) programmers learn much more slowly, they take a lot of time to accomplish tasks because they are being distracted by their curiosity. But after that investment they easily outstrip their peers in productivity, and more importantly can do things that an (a) type programmer can never do. What I've come to accept though is that giving a (b) answer to an (a) questioner just leaves them confused. They asked about assignment, and a discussion of scope just leaves them befuddled (since they don't know what scope is anyway). Which can be frustrating to the answerer who is a type (b). Type (a) should not be doing a Masters program in the first place, so I feel your pain in that regard. Google is great when you're out in the world, but it's a terrible way to "big picture" learn.
- malshe 5y agoGreat explanation! I wish I could influence the student intake but as a faculty I find it difficult to negotiate with the administrators whose objective function is to maximize the program enrollment! So I have accepted the status quo. Nonetheless I show them how I would solve a specific problem without going to Google at all.
- bruce511 5y agoAlas most post-graduate programs are under subscribed, and it is important for reasons of prestige etc to maximize enrollment. There is no point in trying to convince others to reduce numbers - those are the very metrics _they_ are judged by. I've [1] adopted the approach of meeting the student where they are answering their question, then trying to take them one step further. I try to encourage good habits, and at the same time ceasely mock bad habits (in a gentle, running-joke, kind of way.) That said I also demonstrate the use of Google in answering a bunch of questions, for which the internet is overflowing with answers. Google is a fantastic resource and there's a lot of great stuff out there. [1] I am not an academic, and my "students" are not in school. They are typically professionals, trained in another discipline, who were around when computers started, and there was no software so they had to write their own. They have 40 odd years of programming experience, but usually with zero formal training. Seeing individuals in this age-group make breakthroughs though is immensely rewarding.
- jmnicolas 5y agoThe problem with this method is that you don't know what you don't know.
- DonHopkins 5y agoWhich is better than thinking you know what you don't know. The most important thing impatient programmers need to learn is TO NOT BE IMPATIENT, not how to learn a programming language in X minutes. Learning patience will help you in all aspects of life. Do you really want to share the road with somebody who learned to drive in 5 minutes, and doesn't have the patience not to speed, tailgate, run stop signs, red lights, and pass you on the right by driving on the sidewalk? More "real" advice: Read LOTS of other people's code. Need to use a library? Then first read the documentation, then read the source code, so you actually understand what it can do, how it does it, that it's not magic, what its limitations are, how to use it, and if you actually need it. I've been working on learning and reading the D3 data visualization library for several years, bit by bit. It's a wonderful library, there's a whole lot to it, the code is brilliant and expertly written, and I've learned a LOT about JavaScript programming in general by reading different parts of it again and again. https://github.com/d3/d3 https://github.com/d3/d3 Mike Bostock: 10 Years of Open-Source Visualization: Did I learn anything from D3.js? Let’s see… https://observablehq.com/@mbostock/10-years-of-open-source-visualization https://observablehq.com/@mbostock/10-years-of-open-source-v... >In honor of D3 1.0’s tin anniversary, I thought I’d reflect on lessons learned. This isn’t intended to be too comprehensive or serious — just a handful of observations as I look ahead to the next ten years. But I hope a nugget or two will interest you, too. HN discussion: https://news.ycombinator.com/item?id=26240339 https://news.ycombinator.com/item?id=26240339
- post-it 5y ago> Need to use a library? Then first read the documentation, then read the source code, so you actually understand what it can do, how it does it, that it's not magic, what its limitations are, how to use it, and if you actually need it. That's the opposite of thread OP's advice. If you need to use a library and you're impatient, find the closest example to what you want to do and then hack away at it until it does what you want.
- yummypaint 5y agoI spent the last week doing exactly this after going over a decade without making a web page and having never done anything java related. The key thing for me was finding an existing website i liked that was hosted on github pages and used that as a template/example to see how things fit together. The learning curve at the very beginning was brutal, but once you get a few toeholds and can iterate things quickly start falling into place. The problem with the textbook approach is you don't know what you can skip until you already know it.
- pwdisswordfish9 5y agoMost stuff getting slung around, as the parent mentions, is rooted in the kind of development that relies on NPM-adjacent tooling. The two things you mention (Java and modern Web development, especially something modelled after another thing found on GitHub Pages) tend to be miles apart in this decade. Where does Java come in to it?
- bruce511 5y agoHe may mean JavaScript not Java. I get a lot of we newbies asking referring to Java when they mean JavaScript. Especially when in the context of web development. For the parent: Java is completely different to JavaScript - the similarity is an accident of marketing and an original vision of the Web (in which most code was written in Java not JavaScript.)
- DonHopkins 5y agoOh it wasn't an accident of marketing, it was meant to fool and confuse people on purpose. Mission Accomplished.
- yummypaint 5y agoThis is a great example of the kinds of background info that become the price of impatience.
- 2muchcoffeeman 5y ago
- tyingq 5y agoI'm the type that likes to learn from some real, existing codebase. This is frustrating in the JS space, as you would have to have the right version of a bunch of stuff to do that, and how to use it. Libraries, packers, packagers, frameworks, minifiers, and so on. Other languages have some of that sprawl, but none quite to the same level, and none with the same pace of change. If you learn like me, my advice would be to have a list of potential candidate projects to learn from and move on to the next one when the tool and dependency hell proves too much.
- davidmurdoch 5y agoI find that generally true of every other language except JS. You run `npm i` and all correct dependencies are installed.
- tyingq 5y agoWas not my experience. The system npm was either too new or too old for the codebase I picked (can't remember). So uninstalled, installed a different one, then some unfixable issue with something called fsevents, other issues regarding "peer dependencies", etc. Similar issues with the second one I tried. The third project I went with went much better, though it was still difficult to learn things (even if they are working) as every project seems to choose different build/deploy tools.
- davidmurdoch 5y agoSometimes I forget about npm v7-8 (the latest versions). They're "backwards compatible" if you consider "breaks everything" a form of backwards compatibility. So maybe you're right. Perhaps everything is terrible everywhere.
- yawaworht1978 5y agoHow much time would you say is fast enough to build a full front end and back end login/authentication system in nodeJS with any db ? I mean including throttling, pwd reset, forgot email/pwd, 2fa, confirmation email etc? Most of the tutorials are notoriously outdated and won't work bc dependencies, but I have build one such app. For someone who knows the J's basics , I mean
- jbay808 5y agoYeah, I tried this approach and got as far as authentication. At that point Google would only tell me what not to do.
- armchairhacker 5y agoIt depends on what exactly your app is because you might be able to use existing solutions. But my recommendation is Firebase or Supabase. These tools were basically designed for this type of webapp. I know a team of junior devs who created a production-app in a few weeks with Firebase. Firebase handles authentication, the database REST endpoint, and various other common webapp functionality, so that stuff is seriously achievable in hours. In Supabase "signup", "login", "login with provider", "send reset email" are all single JS functions.
- yawaworht1978 5y agoThanks, is there a public repo?
- ipaddr 5y agoI wouldn't because all of that comes out of the box with laravel. It would take 5 or 10 minutes (npm install taking up the majority of that time)
- rockbruno 5y ago> every time you encounter a problem google it. One "patience" problem I have is that problems are usually much more complex than they appear. Node is giving you some random dependency error? It's because you need to install X. But to install X you need to install Y. But to install Y you need to install Z. But Z requires some specific node version. But that specific node version will break A, and to not break A you need to install B which requires you to disable your Mac's SIP so that it can work with X. If I sniff that I problem will lead me to a hole like this I get so annoyed that I start avoiding that specific platform as much as I can. Software is so fragmented nowadays that even setting up something simple requires you to handle tons of difference pieces for no good reason. Monopoly aside, this is one reason I like Apple having full control of iOS development.
- armchairhacker 5y agoYes, node.js and JavaScript transpile issues in particular are super annoying. But idk if any book would help you with this either. I recently discovered Vite (with pnpm) and so far I haven't had any annoying JS/npm/engine issues, so that would be my recommendation. Generally to setup something I either a) run `<build-tool> init`, b) "create new project" in IntelliJ, or c) clone a medium-sized project on GitHub, then remove the code and leave the configuration files.
- smoldesu 5y agoI think this strategy works for just about every language but Javascript. Last week I was trying to learn JS with this method and it sucked, almost exclusively because there is so much content to sift through that it's difficult to separate the wheat from the chaff. Reading the documentation, while not particularly glorious, is the most time-efficient method of learning a language in my experience.
- Waterluvian 5y ago100% And the most important advice, in my opinion, is to expect to write a LOT of garbage code that you replace almost immediately. It’s not like pouring concrete. You’re not wasting your time or code. It’s a learning process and once you’ve written it, you’ve absorbed all the good and bad lessons from it. I struggled a lot with paralysis where I refused to even begin a project until I could see the “right way” to get to the finish line. But now I just do a tiny little bit of design (for toys and personal projects) and then dive in. There’s no better way to deeply understand why a certain concept is important than doing it wrong and suffering the consequences.
- divbzero 5y agoAnother great source for up-to-date info on getting started are tutorials from official docs. Most mature projects will on them.
- wruza 5y agoI always found this way too clumsy, because you learn X but accidentally miss Y, and X becomes your tool of choice at places where it doesn’t really fits best or at all. Javascript traditionally had NO good language guides, and this one looks pretty like the one you should read in advance. Other resources are either more library reference-like, very situative or for unclear standard, not exhaustive, or just stupid and wrong. I’ve read a language guide A to Z for every PL I used in my life (a bunch), and can say by skimming through few rough/key topics that it is definitely a good one. No offense, but my advice is to not apply your advice when there is a good guide. You’ll save both your own time and the one’s who will come after.
- Lamad123 5y agoStart with Javascrip, the Good Parts.
- zerocount 5y agoFor beginners, this is the last book to start with. I'm a big fan of Doug Crockford, but this book is opinionated and the examples are often not well explained.
- thealig 5y agoyes, there are a lot of half baked guides and blog posts out there about JS. there are a couple which are really good: https://javascript.info/ https://javascript.info/ - explains good ES6 practices https://github.com/getify/You-Dont-Know-JS https://github.com/getify/You-Dont-Know-JS which goes in depth in the messy core of the language. nowadays I usually refer to MDN docs and one of the guides like above when guidance is needed.
- Lamad123 5y agoYou cannot just google your way through it. There are times when you don't even know what to google. I remember as an early beginner being stuck with something that had to do with closures. I had no idea what was going on and didn't know what to google and when I asked questions on stackoverflow and reddit please started saying things about decorators and whatnot!!! It is only when I sat down and went through some kinds of structured tutorials that I knew what had stomped me. Sometimes, you ight just have to be aware of some problems even if you'd don't understand them properly but you are aware of their existence and what they are called.
- folkrav 5y agoUsually I just take a quick glance at, and/or try of the main features of a language in some REPL or toy program, _then_ will jump straight to developing something to it and Google/DDG my way through. I do agree that just Googling your way through without having a basic grasp of the general philosophy and main tools a language puts at your disposal can be counterproductive.
- TameAntelope 5y agoI’m the complete opposite; I’ve yet to encounter a problem I couldn’t Google or bug someone in IRC about (and that’s the key). Sometimes you have to engage with someone else to solve a problem, but there are hundreds of people willing to do just that at literally any given time of day.
- dotancohen 5y agoWhich IRC channels would you recommend?
- davchana 5y agoYes, as a last resort, googling simply the error or part of error gets one on the way to solution. Very rarely I had to face a search term which doesn't point or advance me towards solution. For context, I use javascript & basic html css to make simple apps for my own use. apps.bydav.in
- 5y ago
- dpweb 5y agoI like Google, or better Stack overflow, when you’re at your desk writing code. Books (preferably paper books), to browse in free moments when not working. I used to keep a paper copy of “JavaScript pocket reference” on me, and pull it out on the train, or just sitting around at night, to help get the concepts.
- 0x0nyandesu 5y agoGoogling how to install nodejs you'll end up with a bunch of nonsense from how to manually set it up to how to do it using some OS specific thing that won't work right when you need to upgrade and everything in between when the best practice is installing 'n' which is a node version manager and does everything for you.
- chii 5y agoif you hadn't experienced the pain of differing versions of node, you will not understand why having a node version manager is useful. So nothing will replace the experience of pain when learning.
- 0x0nyandesu 5y agoWhen I onboard new hires I tell them to install it using n and all the instructions give you version numbers because our mobile app, unit tests, and webpack among other things have minimums so the pain is readily apparent but I make it a non issue with clear and concise install docs.
- JohnHaugeland 5y agonpm init is not involved in setting up node. Go ogling it leads to being told to use os package managers, which do the wrong thing