8 ms·
JavaScript is extremely accessible and the warts can easily be worked around. I spent a lot of my life being a JavaScript hater and after working with it for f
by codezero 8y ago
JavaScript is extremely accessible and the warts can easily be worked around.
I spent a lot of my life being a JavaScript hater and after working with it for four years I can definitely see how it is really a simple starting point for a lot of concepts. Sure it has warts. What doesn’t?
Have you worked with a JS language for any extended period of time? What about that made you not even want to consider it for anything? I’m really curious, I’m not trying to set you up - I’m really not exeperienced enough to do so :)
Edit: to be clear because of general curiosity and because I hate bringing work home, most side projects I work on are in some other language.
- dymk 8y ago> and the warts can easily be worked around Not really. The author doesn't leverage any kind of static typesystem, which would at least mitigate some of the warts. He's chosen Node.js instead of leveraging the browser, so no free visualization layer for doing anything interesting with, unfortunately. > Have you worked with a JS language for any extended period of time? Most of my day job is working in a really, really big Javascript codebase. I can say with confidence that the language is something that we're absolutely stuck with, and I still have no idea why somebody would implement a pedagogical database with it (well, then again, they haven't; they've implemented a key-value store, which is trivial). To offer an alternative, they could have chosen something boring but everywhere like Java, which is just as accessible to those with less experience. Then they'd have the possibility of doing fine-grained parallelism, file access, designing abstractions that fit within a statically typed language.
- primitivesuave 8y agoThis was my thought exactly. For many high school and university students in the US, Java is their first language and introductory courses usually deal in unsatisfying toy applications. I could imagine a great primer into building a database that introduces all kinds of interesting computer science concepts as well as practical programming techniques (e.g. organizing a project as it grows).
- codyb 8y agoNo stupid questions time, but given all languages, would an array based language like J be a decent choice for building a database from scratch? I mean, tables seem like doubly indexed arrays. In my mind it wouldn't be readable but it'd be maybe less lines of code than other languages? I have never thought about building a database that takes into consideration CAP theorem and ACID compliance, sounds super tough. I'm usually happy enough when I learn something neat about Postgres. I thought this would be neat but it's just a kv store in JavaScript.
- eksemplar 8y agoHow is JavaScript accessible? Because of websites like the linked article, which covers the basics, that lets you build things? Because Udemy, codeacademy and all the others will teach you how to google program using it? Maybe you’re right, but this page doesn’t actually teach you databases, and most of those courses don’t actually teach you programming. At least not efficiently. I have worked with JS for a long time, and I don’t hate it, but it’s such a terrible language and environment that the most popular part of it is literally a strict syntactical superset of of it. I don’t particularly like Typescript by the way, and I don’t think it’s really that useful, but you can’t deny that most people do. I think 95% of all projects would be better of using something that wasn’t JavaScript for the whole stack, and I think that’s the reason so few things are build on node. I like graphql as much as you do, I also think Prisma is okish, but I’d rather use Django, Flask, Java Spring it .Net Core because they are so much more efficient in the long term. Of course on the client side, all the innovations and all the talent lies with JS, and there is some advantages for using JS for your whole stack. Those advantages end at the DB though, at least in my opinion. This isn’t a problem, you can use Prisma for Postgres, and there are decent drivers for mssql, but I’d never advise people to use nosql unless they had a very specific reason for doing so, and I can’t think of one.
- kkarakk 8y agojs is perfect for the resource constrained student of today ie their primary computing device is a mobile.mobiles ship with a js environment built in regardless of platform. i used to be like you until i had to start advising kids from low income environs in india on what language to learn(from a personal desire to create hackers with low resource access and seeing what happened+give them access to coding as a skill). js really is the most accessible
- deleted 8y ago[deleted]
- eksemplar 8y agoDo they have internet? Because if they do, then cloud9 IDE is an excellent way to teach, any language too. One of the best examples of this is CS50x from Harvard, which uses it (and other cloud services) to give students an IDE, automatic helpers, debuggers and code checkers. Node is easy to set up and get going with, but if you’re teaching people how to hack, maybe it’s better to teach them something much more low level so they can actually build real things? I mean, if you want to build a solar powered aquafarm, or water pump, then C or Python and a raspberry gets you a lot further than JavaScript, and with C you actually learn how computers work. But I guess it depends on the circumstances, and not knowing yours, then perhaps JS is a good choice.