DEV Community

Discussion on: How to Write JavaScript When You Don’t Know Where to Begin

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

I'm 6 years or so (can't recall) into my programming adventure. I cant say I did write psudocode but I certainly just tried and tried and tried again until my solution worked (probably). These days I can relate to developer who has just started off, I have picked up some rust. Of course some good advice when learning a language. Write something real, respectfully I have never had to use the Fibonacci sequence (your code is very clean!), So of course I decided to write a programming language in a language I didn't know very well, nothing fancy but honestly if I'm not looking up parser theory, I'm looking up rust, this provides variety and teaches me more effectively then getting stuck on one problem. I have one final peace of advice on the subject, learn to write unit tests, this is 100% the best way to reimagine your work, it will move you from staring at a blank editor to thinking about requirements of your code in bite sized pieces.

Collapse
 
canderson93 profile image
Carl Anderson

Interesting idea to write unit tests.

A big part of what I'm recommending in this article is clarifying your ideas, and unit tests are definitely a good way of doing that. Defining what your code is supposed to input and output is a big part of working out how you're going to approach it.

Taking on a programming language is one hell of a challenge :) One of my professors at university was working on the whiley language, and he maintains a blog about some of the issues he hit. It might be of interest to you.