Live data from Hacker News

Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node

bitbucket.org

71–80 of 304 posts

Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node

#71

This 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…

+1 for not recommending build systems

Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node

#72
post #48

Earlier quoted context omitted.

[deleted]

My assumption was that this was inserted as the generic response to having to deal with COPPA. Not sure if you're collecting information that would be afoul of that law.

One of the few times when regulations like this actually hurt more than help.

Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node

#73

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.

Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node

#74
post #58

Hey 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…

Good tips if you want your code to fail randomly on older devices.

Older devices running node?

Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node

#76

Earlier quoted context omitted.

Thank you! I'm watching a lot of Youtube videos. This is how I got to cellular automata. My dad showed me git last week.

That's so freaking cool. Git rocks, and I remember how psyched I was when I learned about it. What's your next project?

I'm not sure. I'm always messing around with different projects.

I used blocklike.js to jump from Scratch to JavaScript. Then I worked for months on this one game for the app store called Sticky Quest. You can find it here: https://itunes.apple.com/us/app/sticky-quest/id1425679649?mt... This how I learned how to use npm packages such as Cordova and Eslint.

Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node

#77
post #57

This 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…

> I virtually skipped having social interactions

That was me, too. It was a trade-off for me. I was reading Hawking in primary school and there was no one to talk to, so I was feeling lonely.

Programming was my lifesaving straw, but I don't wish any kid the kind of isolation that I've felt in my youth. I had to learn many of the social stuff later in life so it evens out IMO.

Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node

#78
post #9

That's awesome. What resources did you use to learn Node and JS? Just looked at your code. Kid. You're a badass. Keep this up, you'll go places.

Thank you! I'm watching a lot of Youtube videos. This is how I got to cellular automata. My dad showed me git last week.

> My dad showed me git last week.

Anyone else miss learning this quickly?

In all seriousness, congrats. Keep at it. There is always something else to learn. It's the career that never stops giving.

Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node

#79
post #74

Earlier quoted context omitted.

Good tips if you want your code to fail randomly on older devices.

Older devices running node?

Surprisingly there are some embedded developers who use Node. I would assume those devices have a trimmed version of the Node stdlib.

Re: Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node

#80
post #42

Good 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…

That last thing a 12 year old needs is a complicated build toolchain.

Hell, I'm 50 and its the last thing I need.
Post reply on HN