News for hackers. Stuff that matters.
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by sramam on Wednesday August 29, 2018 @05:21PM (#17872174)
Congratulations!

I 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 cellula... by liamilan on Wednesday August 29, 2018 @06:05PM (#17872486)
Thanks a ton!

Tell your son that it took me a while, and a lot of work, but it feels great to finish something (there are a lot of projects that I don't finish...).

I began learning using Scratch a long time ago. They even featured me last year (the project was a solar system in which I used sine and cosine to calculate the rotation of the planets). I then used blocklike.js to move to JS.

I watch a lot of YouTube videos. I like The Coding Train, Carykh, and Code Bullet, and I get a lot of my ideas from their projects.

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by samstave on Wednesday August 29, 2018 @06:43PM (#17872735)
Startup Idea: Start a slack/discord group for aspiring students between the ages of [pick your age range, say (8-18)] and start a mentoring/support group with these like-minds...

You'll learn, build relationships and some of you will go off and found companies together.

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by elliotec on Wednesday August 29, 2018 @06:49PM (#17872770)
Starting a Slack group for students is a good idea, but decidedly not a startup idea.
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by wolco on Wednesday August 29, 2018 @07:23PM (#17872937)
What about a saas to support the companies providing groups for slack.
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by _hardwaregeek on Wednesday August 29, 2018 @08:01PM (#17873095)
I've considered building a "coding buddies" site. Something that's been lacking about the whole Codecademy/Hacker Rank/etc sites is the lack of intrinsic motivation. An actual person with whom you can work could potentially provide that.
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by samstave on Wednesday August 29, 2018 @09:42PM (#17873537)
Yeah thats what I was inferring... Basically - start a slack, find a bunch of people like him - pick a project to build together that suits their need (coding buddies) and build the tool.

Kind of like when I was trying blacksmithing, the teacher makes you make your tools first.

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by jakecopp on Wednesday August 29, 2018 @08:24PM (#17873204)
I'm 21 but I wish something like this existed when I was younger!
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by kazinator on Wednesday August 29, 2018 @08:59PM (#17873354)
I'm 47. There were computer camps and clubs when I was a kid. They probably took a downturn, though, as computing went mainstream and turned into consumption of video games and, later, online socializing.

Maybe you were either too late, or too early, depending on perspective. :)

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by TheGrumpyBrit on Thursday August 30, 2018 @07:41AM (#17875839)
38 here. I was learning Turbo Pascal in around 96. I'm sure there was a lively community around it, but it would have been on IRC and usenet, which was still a little daunting to me. My primary resource was the SWAG archives, and I honestly can't remember if it was a bunch of floppy disks or a website. Either way, I remember many hours lost to running various random bits of Pascal and hacking them together to make what I wanted. Which is pretty much the same way I code today.
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by comtn on Thursday August 30, 2018 @12:56AM (#17874189)
I am 24, and was programming when I was 12. I remember spending days trying to get Visual Studio to download. I began working with Visual Basic Macros in Word. Although it wasn't very well understood in the schools around me, I found the comfort of those online willing to teach, and help others like it seems he is being shown here.

The mentality of those taking boot camps, and the mentality I had when I started coding are vastly different, but I can see the use.

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by mistermann on Wednesday August 29, 2018 @09:04PM (#17873376)
I wish I was 21. Or 31 for that matter.
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by FactolSarin on Wednesday August 29, 2018 @06:31PM (#17872650)
> there are a lot of projects that I don't finish...

You and me both. :)

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by dajohnson89 on Wednesday August 29, 2018 @06:55PM (#17872795)
He's one of us :)
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by sramam on Wednesday August 29, 2018 @08:39PM (#17873275)
sine and cosine last year? Now I want to know what your parents are feeding you!!! ;)
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by kazinator on Wednesday August 29, 2018 @08:57PM (#17873341)
I also picked up sine and cosine at around that age; it was thanks to programming.

Various example BASIC programs (e.g. Lissajous curve and circle plotters and such) used those functions and from their behavior I kind of picked up the relationship to both undulation and the circle. I found out about the arctangent function, and from that I realized that it could be used for 3D projection. I made a proof-of-concept program that mapped some connected points in 3D (boxes and whatnot) to 2D by calculating the visual angles using arctangents: i.e. I plotted the angle between the line of sight and each point, rather than a simple planar projection. It resulted in the objects appearing in a very nice "fish eye" perspective on the screen, which was very pleasing. From all that I learned about radians also and how there are "two pi" of them in a circle, since the functions accepted radians and not degrees.

You know how they say that necessity is the mother of invention; it's also the mother of learning trigonometric functions and whatever else.

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by jwdunne on Thursday August 30, 2018 @03:13PM (#17879812)
Similar age for sin/cos. I wanted to move a game object in a circle that I used to develop amateur content for. I remember being wowed by light displays some scripters put together at the time (there was no particle system at the time).

By the time it came around, I was disappointed to learn about all the "triangle stuff". I want quite there enough to make the link between right angle triangles and a circle but it made that topic so much easier to connect.

Thanks to programming and the thought patterns it drums into you, I was able to do my maths course work in a few pages (far less than anyone else) but still achieve high marks. I remember one top performer in my class complained to my teacher because of how little I'd produced! The teacher said "doesn't matter - he used an approach that let him do that".

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by jgtrosh on Thursday August 30, 2018 @03:22AM (#17874684)
Much better motivator than math classes in school too
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by danellis on Wednesday August 29, 2018 @09:30PM (#17873485)
I learned how to use sine and cosine for drawing circles when I was probably 9 or 10. It was years before I found out what they actually mean and how they work. I didn't even know what the curves looked like.
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by rothron on Thursday August 30, 2018 @04:39AM (#17875045)
I've got a 10 year old who's been making a lot of stuff in Scratch since he was 6. I've been trying to think of how to phase him over to less limited languages and wasn't aware of blocklike.js, so thank you for that idea.

Having a lot of projects that you don't finish is completely normal, so don't worry about that.

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by flavio81 on Wednesday August 29, 2018 @08:31PM (#17873236)
>I showed your project to my 12 year old son who has just started to learn programming (in JS no less!)

It would be much better if he would start with Scratch, Processing, Smalltalk, or even Python.

On JS he'll have to lose time coping with complicated build tools, horrible package system, async etc.

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by skeeterbug on Wednesday August 29, 2018 @08:39PM (#17873277)
Is this serious? I started programming around 9 or 10 on a Commodore 64. I would go to the local library to get programming books for it. Now you can hit F12 in your browser and get a powerful console into JS. JS is fine, encourage the thirst for knowledge.
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by not_kurt_godel on Wednesday August 29, 2018 @10:47PM (#17873775)
JS is an objectively bad programming language. It is not fine, it is just annoyingly common and convenient. The main advances in its ecosystem are related to transpiling it from other, saner, languages. If he has fun writing JS, then great for him. He's 12, he'll do it if he wants. But it'd be doing him a disservice not to open his eyes to much wider, greener pastures of the programming world.
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by cztomsik on Thursday August 30, 2018 @12:46AM (#17874153)
JS was my second language (around the same age as he is, which is more than 15 years ago) and it is still my favourite one. You give zero arguments but I won't make the same mistake:

- devtools are unmatched for browser development (and getting better for node)

- absolutely best language for prototyping (dyn. typing, monkey-patching, eval, and a lot of other "evil" things you usually don't need in further phases but it's really great to have them for this exploratory phase)

- I respect that some people prefer static typing and code-completion but I prefer writing tests and having few well-known libraries for which I don't need completion at all

- no threads, no mutexes, no locks

- object literal, rest-spread, destructuring, classes are just ordinary (and mutable) objects, etc...

If you think people are doing JS just because it's the only language in the browser (not true anymore) you should seriously reconsider. There were to-js compilers before and it was always awful (remember gwt? dart?)

Of course, it depends on use-case, JS is not the best language for everything.

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by exDM69 on Thursday August 30, 2018 @01:51AM (#17874355)
JS is a bad language but it's the easiest environment to set up.

Back in the day we started with Qbasic not because it is a good language but because that was easy to set up, we all had it and our friends had it and our school computers had it.

And JS is less bad a language than Qbasic.

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by kilon on Thursday August 30, 2018 @10:53AM (#17877214)
That's debatable. It's not as if downloading Python and making your first app will take you more than a few seconds, minus download time.

Set up is rarely an issue, once you set up a language even as complex as C++ its completely automated. You press a button and magic happens.

If the biggest selling point of a programming language is that it comes preinstalled with the OS of your choice, its not much of a selling point when the average user downloads and installs GBs of data just to play the latest game hype like Fortnite.

The only people who mind installing stuff are predominately web devs. 99.9% of users out there are fine with it for more than 6 decades now and that wont be changing any time soon.

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by exDM69 on Thursday August 30, 2018 @02:02PM (#17879062)
It does make a difference especially to a beginner or a child. You might not have admin privileges at your school or your friends may not be able to install those tools so you can't show your work.

But you can hack away on any computer with a browser.

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by kilon on Thursday August 30, 2018 @03:07PM (#17879742)
there are tons of services only that will allow you to code online using any language eve C , C++ and Assembly. From inside the browser of course. Of course I am not recommending a beginner to start from any of those languages but it shows that JS does not have the monopoly of in browser coding. If you have to stick with browser no matter what.

Ideone is a popular example https://ideone.com/

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by ascorbic on Thursday August 30, 2018 @01:37AM (#17874311)
Transpilation certainly has been important, but in no way is that the only or even the most important advance. The most significant advances are the massive changes in architecture that have turned it into a modern, fully-featured language. You can use most of those in all modern browsers right now. It might not be the best language, and isn't a great choice for a first language to learn, but it is a good one to learn next.
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by gear54rus on Thursday August 30, 2018 @03:38AM (#17874734)
no man its objectively good language, believe me.

see how that sounds? that's how you js haters sounds each time I see this bs here on this and many other platforms that wouldn't be possible without js.

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by not_kurt_godel on Thursday August 30, 2018 @03:12PM (#17879795)
> no man its objectively good language, believe me.

A language that requires a 21x21 matrix to remember how equivalency works is objectively bad: https://dorey.github.io/JavaScript-Equality-Table/unified/

A language whose default sort behavior is the following is objectively bad:

    [5, 12, 9, 2, 18, 1, 25].sort(); → [1, 12, 18, 2, 25, 5, 9]
I used to be a frontend dev. I have written hundreds of thousands of lines of production JS code for apps that many Hacker News users use on a regular basis. I well understand how much JS has made possible. The web would not be the same without it. But that doesn't mean it's a good programming language.
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by Jgoure on Wednesday August 29, 2018 @08:52PM (#17873316)
This kid is practicing calculus at 12 years old. He will be able to handle a package manager.
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by not_kurt_godel on Wednesday August 29, 2018 @10:34PM (#17873741)
It's still a waste of his time to deal with it. The brain has only so many ultra-neuroplastic years, why burn them on dicking around with npm when they could be leveraged to focus on more universal concepts?
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by dolessdrugs on Thursday August 30, 2018 @09:33AM (#17876529)
because "full-stack"

JS is the New York of languages: dirty and gross and hella expensive, but if you can make it there, you can make it anywhere.

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by sramam on Wednesday August 29, 2018 @08:58PM (#17873349)
Isn't Liam's project proof that you don't need any complicated JS tooling?

A simple `node index.js` can go really far.

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by cphoover on Thursday August 30, 2018 @02:56PM (#17879649)
Yes amazingly he did this without the need of `left-pad` too. ><

Good job Liam

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by rymate1234 on Saturday September 01, 2018 @06:43AM (#17891239)
You need none of those things to get started with JS development

It’s still perfectly possible to just create a html document, shove in a script tag, and start developing

And if you want to use packages from the npm ecosystem you can easily use https://unpkg.com/

Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula... by krapp on Wednesday August 29, 2018 @10:39PM (#17873753)
The only thing you need to learn programming with JS is a text editor and some rudimentary HTML knowledge.

Everything else is unnecessary, at least as far as the programming language itself is concerned.