I like how the array named 'map' reflects our original use of this word, rather than the special meaning which it has acquired to programmers. In Javascript and other languages 'map' has become a kind of "functional operation" so we cant call things 'map' anymore (in public). We have to say 'space' or 'state' or 'grid' or something... but I do still think 'map' was good. Congratulations on a very efficient and readab…
Programmers got it from mathematicians. I had the impression it was a fairly long standing use of the word.
Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
81–90 of 304 posts
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#82It's amazing that at the same age Steven Wolfram himself had written his first 100 page book "concise directory of physics) and at just one year older wrote his first book on quantum physics.
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#83This is awesome! Keep up the good work. As a fellow developer who began writing software around your age, I have some advice that is definitely subjective and biased, but which you may indeed find helpful. 1. Keep practicing. Practice makes perfect. Explore different languages, frameworks, and problem spaces (interfaces, servers, distributed systems, statistics, etc.) to see what you find most interesting. You will m…
9. Bookmark this page, so you can come back and see the wonderful advice that you got when you were 12. It will make more sense as you get older.
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#84Technically, you shouldn't be using this site ;) > If you are under 13 years of age, you are not authorized to register to use the Site. But I applaud you for getting into programming this early.
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#85Hey looks good :)! Just a few things you might not know about: Google String.prototype.padEnd. It’s built in to JS and should be able to replace your zero fill function. And instead of mutating the ruleSet array you should be able to use Array.prototype.map like this: const ruleSet = zeroFill(8, rules.toString(2)) .split('') .reverse() .map(item => parseInt(item, 10)); And you can clone arrays like this, instead of u…
Though, keep in mind that some of this stuff (most notably the [...arr] syntax) won't work in old browsers if you make a web project (IE 11 is a big offender here). See https://caniuse.com/ for a useful source of info on what will work with what for stuff like that. If you do web stuff (and you don't want to just say "no IE 11" - some people, and even some big companies, do that!), usually the easiest way to handle s…
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#86This is awesome! Keep up the good work. As a fellow developer who began writing software around your age, I have some advice that is definitely subjective and biased, but which you may indeed find helpful. 1. Keep practicing. Practice makes perfect. Explore different languages, frameworks, and problem spaces (interfaces, servers, distributed systems, statistics, etc.) to see what you find most interesting. You will m…
Would you please provide an example on how one proceed with T shaped learning and expertise?
There's a lot of ways to learn anything, but I would say that the first step is pursuing a variety of subjects that you find interesting, and even some you think are boring. A lot of seemingly boring things I've found turn out to be quite fascinating when it comes down to it. (e.g. database design)
Over time, you will pick things up, and put them back down. You will return to some, and stay away from others, but eventually you will build a repertoire of knowledge and experience in a variety of different fields. I would also bet that at least one subject will interest you so much that you keep coming back and in which you will ultimately develop expertise.
Experimentation is the name of the game!
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#87Great work! I made a quick Observable notebook out of your code, in case anyone wants to see what it does without downloading or running it on their own machine: https://beta.observablehq.com/@jrus/wolfram-cellular-automat...
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#88It's amazing that at the same age Steven Wolfram himself had written his first 100 page book "concise directory of physics) and at just one year older wrote his first book on quantum physics.
From all the amazing things Mr. Wolfram has done at such a young age almost makes him the Chuck Norris of science.
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#89I showed your project to my 12 year old son who has just started to learn programming (in JS no less!) and his jaw dropped.
In addition to being a programmer, you are now a role-model. Really well done.
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#90Hey looks good :)! Just a few things you might not know about: Google String.prototype.padEnd. It’s built in to JS and should be able to replace your zero fill function. And instead of mutating the ruleSet array you should be able to use Array.prototype.map like this: const ruleSet = zeroFill(8, rules.toString(2)) .split('') .reverse() .map(item => parseInt(item, 10)); And you can clone arrays like this, instead of u…
I think it is good he's learning to do the loops by hand first. It's good to have an understanding of algorithms first when learning to code.