News for hackers. Stuff that matters.

adrianhel

Can I consent to permanent storage somewhere? I love using the timeline in Google Maps!
Re:A little bit of plain JavaScript can do a lot on Sunday June 21, 2020 @04:30PM (#23595147)
Why bother with jQuery? I don't see the value add anymore.
Re:Advice to Young Web Developers on Friday June 19, 2020 @01:44AM (#23571361)
Another thing I painfully realized: It that is not a good idea to document HTML in HTML.

<details> <summary> It's not a good idea </summary> really. &lt/details>

Re:Advice to Young Web Developers on Friday June 19, 2020 @01:12AM (#23571184)
It's the snappiest browser at the moment and I love its render as text function and automatic ad blocking on mobile. I've made a permanent switch on mobile, but I tend to miss the Chrome dev tools whenever I use it on a computer.

It's also wonderful that the browser is truly privacy conscious.

Re:The Road Less Traveled to Fusion Energy? on Friday June 05, 2020 @04:05AM (#23426146)
I did not know that. That's great!
Re:The Road Less Traveled to Fusion Energy? on Thursday June 04, 2020 @12:59PM (#23419035)
There is a lot of land in the world. And definitely have the capacity to build the supply chains. It's just that it's slow and expensive while oil, gas and nuclear is fast and cheap.

We need policy changes. Or in a very ideal world, fusion.

And to elaborate on the other side of the argument: JSX creates plain JavaScript objects instead of exposing an "almost-JS" templating language. Additionally you get an enormous amount of flexibility. For some types of apps that is very important.
Re:From Node to Deno on Sunday May 17, 2020 @01:06PM (#23213352)
It's an unstable feature, but you can use import maps with Deno.
Re:From Node to Deno on Sunday May 17, 2020 @01:02PM (#23213306)
I agree. But I do like query builders (Knex for Node). I still write and think in SQL, but don't have to write queries as strings.
For 7% a P/E of 14.285714285 or less would be good to be very precise.
Re:A one-line package broke `npm create-react-app` on Sunday April 26, 2020 @08:24AM (#22986643)
There should be a Promise.isThenable or Promise.is. Strictly speaking this library checks if a value is a thenable.

With optional chaining I would however use this check:

    typeof x?.then === 'function'
Or if I was code golfin:

    x?.then?.call
The first case does not account for built in prototype extensions and the second has false positives with certain data structures.

So the function in is-promise should be available as Promise.isThenable or Promise.is.

Scrolling on iOS browsers is an utter pain due to rubber band scrolling. It can be solved with -webkit-overflow-scrolling and hard work.
Re:Mounting evidence for Covid-19 treatments on Monday April 06, 2020 @12:16PM (#22794960)
This was really interesting! Would be interesting to see how this interacts with hemochromatosis.
Re:Things Markdown got wrong on Saturday April 04, 2020 @04:15PM (#22781133)
Agree. It's really missing the point of how this has been used in reality for the sake of promoting semantics in an area where semantics rarely matter.
"Singular marketplace" – there's your problem.

With Android, at least you can download an APK.

That's anti-trust at its worst. Sue Apple.
Re:Ask HN: Best practices for ethical web scraping? on Saturday April 04, 2020 @01:07PM (#22779618)
I like this approach. Personally I wait an hour if I get an invalid response and use timeouts of a few seconds between other requests.
Re:Rust docs team is no more on Friday April 03, 2020 @11:17AM (#22770072)
Good strategy. By ensuring good documentation in the early stages, the community will likely follow.
Re:How to manage HTML DOM with vanilla JavaScript only? on Thursday April 02, 2020 @05:28PM (#22764075)
Just use vanilla JS to begin with. If your app has a lot of interaction, you can use React with create-react-app makes things easier.

You can still use vanilla JS, HTML and CSS. And it's not morally wrong.

Assess the requirements. Lots of moving parts and not a whole lot of time? React or Vue lets you draw the big lines quite simply. Need something simple or with fancy animations? Vanilla may be your best bet.

Personally I use vanilla for simpler stuff and React for more complex apps.

Don't worry, just make cool stuff. Nobody ever cares how you built it, just that it works.

Trello still uses CoffeeScript. It really does not matter as long as it works.

PS: You can combine if and when needed.

Re:How to manage HTML DOM with vanilla JavaScript only? on Thursday April 02, 2020 @05:14PM (#22763941)
That is not the case anymore. Vendor prefixes are discouraged and seldom needed.
Re:How to manage HTML DOM with vanilla JavaScript only? on Thursday April 02, 2020 @03:42PM (#22762870)
DOM diffing is great for most stuff. When you need anything other than "Replace this with that and don't defocus my input fields", DOM manipulations are great. Drag'n'drop is a great example of this.

There is a lot of potential for the imperative APIs for this though. I even made a proposal:

https://github.com/adrianhelvik/proposal-move-events

Re:New iPad Pro with LiDAR Scanner and trackpad support on Wednesday March 18, 2020 @12:38PM (#22618494)
I just hope it doesn't use a butterfly keyboard. Man, Apple is making home office worse than it needs to be.
In Norway we just slipped from the 2nd most infected per capita to the 3rd after government warnings. If your country has >= 1 infected, you should follow the advice at fhi.no/en.
Take action now.
No. Gambling ads are not allowed though. Neither alcohol or smoking are banned, but ads for them are.
Some things I'd have loved to be told to build:

    Simple 2d game
    To do app
    Timesheet app
    Implement a clone of x with something extra of your choosing
    Top Twitter celebrity app using its API
    Building a search engine
    Creating a programming language
An issue with the programming courses at my uni was that none of them used a database. The programs were toy apps by design. Instruct students to use sqlite or MongoDB, and encourage them to use PostgreSQL/MySQL.

Our database class did use databases, but we had no integration of the two subjects.

Re:I Don't Want to Teach My Garbage DSL, Either on Friday May 31, 2019 @05:57AM (#20059540)
That sounds kind of terrifying.
Re:I Don't Want to Teach My Garbage DSL, Either on Friday May 31, 2019 @05:48AM (#20059517)
Do anyone here expose real sql querying capabilities to your users?
Re:I Don't Want to Teach My Garbage DSL, Either on Friday May 31, 2019 @05:46AM (#20059512)
Then again, REST/RPC are query languages in their own right.

How would one go about securing this thing anyways?

(I agree with the basic sentiment, but find it somewhat unrealistic)

This depends on the app however. For a landing page? No way. For a module within an app I would not mind, as long as lazy imports are used.

Older »