News for hackers. Stuff that matters.

dadior

Re:How to Think About Writing Tests on Tuesday October 05, 2021 @03:36AM (#28756478)
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.
Re:Offline First on Thursday September 30, 2021 @05:08AM (#28704420)
Did you try CouchDB's full text search? I red the doc it's using Lucene underlying.
Re:Offline First on Thursday September 30, 2021 @04:18AM (#28704198)
Thanks, this solution might be better than mine, it don't need JVM
Re:Offline First on Thursday September 30, 2021 @04:13AM (#28704181)
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.
Re:Offline First on Thursday September 30, 2021 @04:10AM (#28704159)
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.
Re:Offline First on Wednesday September 29, 2021 @06:55AM (#28692158)
Yes, I am on javascript stack, maybe using other language client side FTS is easier? I don't know
Re:Offline First on Wednesday September 29, 2021 @06:51AM (#28692135)
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!
will cryptocurrency market crash in the near future?
Re:Delphi 11 Alexandria on Thursday September 23, 2021 @05:46AM (#28627107)
I was using Delphi 5 for years, that's 2001 year, to build a Vehicle annual inspection system
Re:Why did the web take over desktop and not mobile? on Saturday September 11, 2021 @09:52PM (#28497903)
And there are some polyfill for it: 'If your application depends on pointer events, we recommend using a third-party pointer events polyfill.'
Re:Why did the web take over desktop and not mobile? on Saturday September 11, 2021 @09:50PM (#28497895)
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.

Re:Why did the web take over desktop and not mobile? on Saturday September 11, 2021 @04:40AM (#28490396)
Yes, I agree, how selfish
Re:Why did the web take over desktop and not mobile? on Saturday September 11, 2021 @04:38AM (#28490387)
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....
Re:Opal Camera on Thursday September 09, 2021 @03:46AM (#28467311)
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.
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.
Re:Self hosting is important on Saturday July 24, 2021 @05:06AM (#27939372)
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.
Have played for a while, some childhood memory
Re:Why We Love Vim (The Changelog #450) – Changelog on Friday July 23, 2021 @06:19AM (#27929073)
I love it, I'm using neovim though.
The employer: humm... I have to rent the office but I can not find my employee there! Half of the time!
Re:The Unix Command Language (1974) [pdf] on Thursday July 22, 2021 @05:32AM (#27917016)
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.
I will use 404
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.