Live data from Hacker News

Mini projects built with VanillaJS. No frameworks or libraries

github.com

91–100 of 171 posts

Re: Mini projects built with VanillaJS. No frameworks or libraries

#91
post #80
post #70

Earlier quoted context omitted.

Can you estimate how much time you put into the assignment? Did you get paid?

Probably a bit more than 12h, and I have to give it to the company, the project was compensated. This was the only time I've experienced that.

I distrust any interview that includes something like this.

It's an arbitrary construct that is not indicative of what form the work will take. Only the first three months of working with someone will give any real indication of what'll be like to work with them for another three+ years.

Re: Mini projects built with VanillaJS. No frameworks or libraries

#92

Some Javascript frameworks I like; some I tolerate. Some ( angular ) I learned to despise. I reserve my love only for VanillaJS. My library for playing with the canvas element[1] is entirely VanillaJS. 0% dependencies. 1000% a learning experience for me, having to seek into the darkest corners of the language to find solutions to problems I didn't even know existed! [1] Scrawl-canvas - https://github.com/KaliedaRik/S…

> 1000% learning experience for me, having to seek into the darkest corners of the language to find solutions to problems I didn't even know existed.

Sounds like the experience has been beneficial for you, but this excerpt reads like a cautionary tale for using "ValillaJS" for real projects. :-)

Re: Mini projects built with VanillaJS. No frameworks or libraries

#93

I'm so glad to see this and projects like this getting attention. I'm responsible for several tools at my current job using nothing but straight JS, including a couple which have had a significant (positive) impact on the special projects team here. I love JS. I love it's ubiquity (F12 in any browser and you've got a REPL). I love the freedom I have when I write in it to do whatever the fuck I want and shoot myself i…

Woa there! Why would JavaScript have `with` if you weren't intended to use it‽ How about: let applyTemplate = template => object => { with(object) { return eval("`"+template+"`"); } }

It's just so beautiful. I can't stop looking.

Re: Mini projects built with VanillaJS. No frameworks or libraries

#94
post #55

Earlier quoted context omitted.

Woa there! Why would JavaScript have `with` if you weren't intended to use it‽ How about: let applyTemplate = template => object => { with(object) { return eval("`"+template+"`"); } }

From the MDN docs: > Use of the with statement is not recommended, as it may be the source of confusing bugs and compatibility issues. See the "Ambiguity Contra" paragraph in the "Description" section below for details. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

"Living a little" is not recommended, because it may lead to confusing situations.

Re: Mini projects built with VanillaJS. No frameworks or libraries

#95
post #6

I love these type of showcases. It‘s been a wonderful time when simply upload files via SFTP and had a running application. No need of webpack bundles, vendor libraries to achieve a simple functionality that could be solved in a few lines of code ... I really do hope this kind of developer attitude (writing pure VanillaJS) is coming back.

Until we rediscover that manually keeping the DOM up-to-date is tedious and error prone for almost any project and switch to a good middle ground such as Preact or React without a build step

I prefer to just refresh the page. Throw away the DOM and render a new one from scratch server-side.

Re: Mini projects built with VanillaJS. No frameworks or libraries

#96
post #18
post #16

Interesting. As a developer who's done no front end work since the nineties and has had little appetite for getting back into it (after having seen what modern front end devs seem to contend with) I surmise that all those crap.js frameworks of the month don't do a whole lot of useful stuf after all. I suspected as much but was always too timid to speak up when I observed how much noise and fury in the office produced…

I always find it interesting that the people who unabashedly admit they have minimal front-end experience usually have the strongest condemnation of the current tools.

I'm a WPF dev. I wouldn't mind learning iOS / Android / QT or whatever heavy client framework and language.

But when I see the mess that front end web dev have to deal with, yes I'm very skeptical !

Re: Mini projects built with VanillaJS. No frameworks or libraries

#97
Here’s a simple game I wrote in vanilla js (client side) two summers ago

https://www.mouse-movement.liammahoney.dev

Heads up it doesn’t work on mobile. Also there some bugs at the end of the game I never got around to ironing out.

Code: https://github.com/LiamMahoney/mouse-movement

Re: Mini projects built with VanillaJS. No frameworks or libraries

#98
post #62
post #57

Earlier quoted context omitted.

This runs nice and fast. Out of interest, why did you use display: flex; on the li's and add the list number inside div's?

They could also have been articles, probably also better for a11y. The browser's implementation of numbering ol's is to align them to the right and render them hanging. They don't impact the layout, much like position: absolute, and they grow to the left. The default ol/ul behaviour leaves some space to the left where the bullets/numbers should fit. This means you need to take into account the maximum width of the nu…

Yes, that's a good consideration, large numbers may have become unwieldy.

I think I would have preferred other html elements over the div even with flexbox css, but it's good to hear your reasoning over this.

Re: Mini projects built with VanillaJS. No frameworks or libraries

#99
post #6

I love these type of showcases. It‘s been a wonderful time when simply upload files via SFTP and had a running application. No need of webpack bundles, vendor libraries to achieve a simple functionality that could be solved in a few lines of code ... I really do hope this kind of developer attitude (writing pure VanillaJS) is coming back.

I hope so too, but it’s not. In all my observations things are moving in the opposite direction at all possible speed. It appears (personal opinion) that this has nothing to do with technology. It’s more about perceptions and behaviors.

Re: Mini projects built with VanillaJS. No frameworks or libraries

#100
post #81

Earlier quoted context omitted.

There's a reason why a lot of those libraries and tools are used though. Webpack bundles are used to strip down multiple JS files and libraries into a single bundle that contains only what is needed to run a particular application. Libraries like React serve a purpose too, particularly when you're building large applications that need to be maintained by many people all at once, or when you need insane compatibility…

Right, its so funny! This is why I cant/wont/refuse to find a job of this type. I can write JS just fine. In employment I would have to glue bloated libraries (which takes me forever!) and then wait for tools to purge the unwanted garbage from the creation. The end result is slow and I feel clueless what is actually going on. Of course this also means I'm impossible to work with which only adds to the joke. I do have…

Yeah it’s really frustrating. My metric of the moment is total NPM package count that comprises a project. Since Angular, out of the box, is greater than 1100 packages I ignore all job postings that mention Angular. I am extremely hesitant whenever I see things like Webpack or Babel.
Post reply on HN