Earlier quoted context omitted.
The fact that it's dead simple is the point of the recommendation. It gives an opportunity to learn the tool with the bare minimum of moving parts involved.
I'd prefer that we unlearn many of these things instead.
Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
61–70 of 304 posts
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#62Hey 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…
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 stuff like that is to use the newest syntax you're comfortable with, plus a tool like Babel that will produce a "time travel" version with older syntax that will work in all browsers.
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#63This is awesome liam. im just over twice your age and am just now writing game of life simulators.... man, what was i doing at 12???
Trust me, there can be downsides to starting early. In my case, I virtually skipped having social interactions not on the internet until I was around 20 or so. Not everyone will have this kind of affliction, but you can't have it all - you gotta choose what's important to you. I hope this doesn't come off as being too negative, I mostly say this because I think you should try to appreciate what you did learn rather t…
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#64It'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.
"At the age of 12, he wrote a dictionary on physics. By 13 or 14, he had written three books on particle physics. They have not been published." https://en.wikipedia.org/wiki/Stephen_Wolfram#Early_life
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#65All your work is in 1 commit and you only have 3 total commits in your repo. I'm skeptical that YOU wrote this program. I'd happily be proven wrong.
This comment violates HN's rules. Please assume good faith and don't attack people. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/showhn.html Consider the ridiculous downside of someone being 12, posting their program to HN, and meeting with this as a first comment. How awful.
So please turn on your neurons and stop playing mother hen and SJW ok?
Being skeptical is a right we all have to take advantage of and since it has been made in a respectful way, there are no reasons why attacking the user in the way you all did.
This politically correct thing is slipping thru your fingers and out of your control of you REALLY and SERIOUSLY think that expressing a legit doubt is considered an act of bullying. Ponder about that.
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#66Good work. For a next step, I would suggest giving a try at breaking it up into multiple files using import/export statements (it doesn't need it but it's good practice), and using a bundler like Parcel to build the finished file. npm i --save-dev parcel-bundler ...then move your source JS files to a folder named src, and add to package.json... "scripts": { "prepare": "parcel --target node src/index.js" "start": " no…
How about we let the kid learn how to program (which will outlive your favorite bundler and file hierarchy anyway) first? It's a 100 line script, one of the mistakes I made learning how to program was trying to be like the adults and focusing on minutiae like code organization rather than good code. EDIT: story time. I once tried to make a 2D game engine in my late teens, but I wanted to be like the adults and have a…
if (window) {
document.write(...)
} else {
console.log(..)
}
...and have it just work, without having to write everything twice.Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#67I feel bad for all the other 12 year olds whose parents just saw this :)
Also, while it may seem great to learn early, I've worked with people who didn't write a line of code until they were in their 50s and they were far better at it after a few years than I am despite having 20 years more experience. Some people have a gift. Others have to really work at it. Sadly I'm in the second group. :)
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#68Hey 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…
Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#69Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
#70Hey 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…