Better HN
topnewbestaskshowjobs
Log inSign up

dadior

6 karma · joined Jul 21, 2021 (5y ago) · 22 submissions

Javascript developer, traveler, freelancer
Submissions

comment 5y ago · link · parent

For me, I always feel comfortable to write test first, stick around TDD. But you don't need to always write unit test first, actually, I guess my major part of coding is begin with integration test. Like a page of a website, then add some necessary unit test. I think ideally the test structure should like olive, the two tip is unit tests and e2e tests, the main trunk is integration test. If you are familiar with all those test lib you are using, then TDD is not slower than just code, even faster, aside test maintain in the future. So even you just throw away some of your tests, TDD is still a good choice for me.

comment 5y ago · link · parent

Did you try CouchDB's full text search? I red the doc it's using Lucene underlying.

comment 5y ago · link · parent

Thanks, this solution might be better than mine, it don't need JVM

comment 5y ago · link · parent

I ever researched this lib, I haven't any data to support my opinion, but I don't have too much confidence on it. Also, this repo didn't update for a while.

comment 5y ago · link · parent

Yes, I used it, generally, on JS platform, the performance is not so good to do FTS, especially when document is long and the data getting huge.

comment 5y ago · link · parent

Yes, I am on javascript stack, maybe using other language client side FTS is easier? I don't know

comment 5y ago · link · parent

Offline first is a dream to me, I build a big note-taking app (midinote.me) which is 100% offline, but now the biggest pain point is the full text search, yes, we can use DB like this and PouchDB to store data, but currently, there isn't a good solution for full text search in javascript, I tried lunr.js the performance is poor, and researched FTS by sqlite, it don't support Chinese, I ever considered pack the lucene (on JVM) with Electron.js( the desktop wrap on JS) on desktop, I'm not sure it is a good idea, now I am going to re-think all these things, and considering give up offline and switch to server side full text search, it will save huge effort comparing to client-side search!

comment 5y ago · link · parent

will cryptocurrency market crash in the near future?

comment 5y ago · link · parent

I was using Delphi 5 for years, that's 2001 year, to build a Vehicle annual inspection system

comment 5y ago · link · parent

And there are some polyfill for it: 'If your application depends on pointer events, we recommend using a third-party pointer events polyfill.'

comment 5y ago · link · parent

Is this the reason that your app don't work on IOS: https://reactjs.org/blog/2018/05/23/react-v-16-4.html#pointe...

The safari do not support the pointer events.

comment 5y ago · link · parent

Yes, I agree, how selfish

comment 5y ago · link · parent

I guess this is because on the mobile device, the manufacturer like Apple, they are more easy to limit the develop of web. Or we can say, on the desktop, the owner of the most popular browser is not the OS maker, imagine we now just have Windows, and IE....

comment 5y ago · link · parent

I don't know too much about camera, lens... but the website UI/UX design is pretty successful, it make people the thing is cool, advanced, and willing to make a try.

comment 5y ago · link · parent

I use docker to deal with different env, and I created several image, with convenient tools, commands, env-variables on it, so I can quickly start a new project. With vs code, there is a plugin called: remote explore, using this tool, you can easily work on different docker container. even remotely.

comment 5y ago · link · parent

Or something is a mix of both: semi-self-hosting, like this app: midinote.me, all your data is on your own computer, but you still can connect to the server, to backup your data, in case you break your computer.

comment 5y ago · link · parent

Have played for a while, some childhood memory

comment 5y ago · link · parent

I love it, I'm using neovim though.

comment 5y ago · link · parent

The employer: humm... I have to rent the office but I can not find my employee there! Half of the time!

comment 5y ago · link · parent

I am fun of command CLI, the only downsides of it comparing to the GUI is this question: how can I find the functionalities of this command quickly, rather than I need to read the whole help docs to start using it.

comment 5y ago · link · parent

I will use 404

comment 5y ago · link · parent

A tiny suggestion, a better responsive layout for the page would be better, my page is fixed on a zoom-in 125%, the page get messy when I open the page.