-
Notifications
You must be signed in to change notification settings - Fork 0
/
diary.txt
1799 lines (1474 loc) · 68.4 KB
/
diary.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
*** ----------- ***
*** Dear Diary: ***
*** ----------- ***
|201111|
wtf last commit didnt change case on hub. Total rename will do.
ok, now fix css a little. Arreglos rapido para que se vean los deshabilitados.
|200423|
Svelte seems my thing.
Still looking server lang, TS, TS... mmm... MS... again? Seems good but... FY wpf, FY J++, FY slvlght, FY... MS.
SVELTE MSAZURESQL NODE
Why bother, I'll be dead soon in my room by asphixia
Nobody reads data ok, the virus is spreading no matter what, It'll get 80% soon.
if slow enough I'll have a bed in the hospital so after I die my lungs continue breathing a little longer.
Lets wait for the vacine.
I feel like doing nothing today.
Mpff.. I'll be plenty of time to do nothing soon,
better do something.
Let's see...
---
I wanna branch.
+ standalone litul-button element
+ abstract
stuck in a fucking hotel the only one in capital city without wifi
How much phone spot? Forget it.
I'll wait 'til I can work at the bar.
Too bad they have pizza delivery bu they dont have wifi delivery.
Branch. Really? Good enough as it is.
but
without wifi, cant learn node nor azure
mmm
need to fix this
Should I slip dressed like Eternauta to catch signal?
Phone maybe, laptop... mmm.
need to fix this
Fixed. 'Till next... anywhen
|200422|
Spent time debugging firefox indexedDB
wtf
chrome opened its old db with no trouble
ff refused: "unknown error not relatd to db"
but it was fixed by creating a new one
I guess it became obsolete, some cleaning broke it, upgradeneeded not working
I dunno
I miss my old sql's job
it doesnt matter, indexeddb is just async test data, it will not be my db in production even for temp offline data.
so, some unworthy testapp changes
|200420|
Acuartelado y deprimido.
61 years old, asmatic, had neumonia spitting blood 5 years ago,
so:
on risk status.
besides
No bussiness is working.
Incomes drop to zero.
Fucking virus.
Crypters and erasers were funnier.
---
Mmm.
Why dev.control. obj ? shouldnt be those props inside the actual objets?
I remember writing the why somewhere.
an structural why or a why from lazyness?
Cant find it...
---
I'd like to add buttons quicklocalsave quicklocalload for offline backup...
just json single rec, dont recommend indexeddb, too hard maintain and to sync.
anyway, json, indexedDb, localstarage, even cookie -dont-, doesn't care, crudpad is abstraction, it just ask for the handler.
---
Shouldnt have activemode prop inside button obj? My own button obj, not DOM's.
Mpfff.
wait, I already started it. There is an unused this.crudButtons = {} just like custom buttons obj
---
Terrible naming. resultCaller ??
---
Panel management. Im not happy. But it works.
---
GIT, versioning. PR instead of overwrite everything.
---
More control? Keep db.id track from db, any db, send/receive it as crudpad property.
More abstraction? No htm controls, so Dev can draw -then bind- to crudpad abstract controls.
so Dev can even avoid buttons and replace them with canvas regions, drop menu items, svg subelements... anything.
not my goal now. Focus!
|190930|
Collaborating with myself, not a way to learn git
I finally got what is stage for... real collaborative you dont want to commit everything
here with no version only master branch
---
Well... still needs BIG CSS improvement
Start versioning
Separate parts, project, tst app, diary...
test-app better stays. Better cheatsheet than any manual.
ALL of this AFTER I'V done some SERVER part work
focus!
---
I felt too lazy to go back nod I mean node learning...
But keeping studing here forever is useless
I feel much, much better now
I can continue node
mixed with translations
Azure? What was that? I barely remember anything.
I'll come back here after node, TS, azure, maybe VUE. It'll be a while.
Unless I get sick again, this is better than a Sudoku.
|190925|
Some breathing. Two fresh fixes.
Addressed the ok button issue,
more control handlers, plus they are all the four optional.
--
then added the force. I mean force mode. force a mode, being this create or read.
useful to, say retrieve local data saved when offline, fill the inputs then .pushModeCreate()
yeah, still looking for a name.
|190922|
Too sick to play with azure functions. Local looks easier... if I remember anything of this.
Delousing the cat?
Implement the new ideas?
Read diary old entries for grammar & spelling errors? Not that I made that improvement in my English
Read me the read me and change it with no purpose, again?
play with css effects
better fix css
Or just write some <p> here to keep the cat awake, stage commit push should I use terminal instead ofmenu,
it wouldbe vanilla git, I would learn more that way. Stage? nonsense.
what a headache. No ffrom code.
Too many tinittus, the old and the new.
Old from the internal, polifonic, unfixable, will stay with me forever until I die maybe a little longer. iiiiiiiiiiiii
the new from the medium ear, blop blop or mpfum mpfum the hearthbeats may my vascular system trying to warn me
its hard to take the complete round with so much fat in your veins, its not a lubricant you fool
if I hit the wall with my head would it hurt more or less? More if I dont hit hard enough.
No, I dont want to play silly games. Silly ccomments are more appealing to me.
I could write a 2200 basic program... I miss my Othello game, AI, four levels deep
or the chess graphics -no AI possible for me- or the 3d tictactoe, nobody wanted to play with -too hard-
or just the sine wave
10 DIM S, X
20 S = 180 / 24
30 PRINT TAB(40 + SIN(X)*38);"*" : X = X + S: GOTO 30
Lets see
pff I failed
Why? 180/24, half cicle / one screen large
should be slower pace
jumps too much I see multiple sinusitis I mean sinewaves
who cares
mmm
lets be pragmatic how many peaks? a lot. Mmm try
22 S = S / 10
four peaks yet
so
23 S = S/4
much better
Oh, I see. Its a math bug. What a fool.
20 S = 24 / 180
22 23 -delete-
Just like its intended, pretty. Hipnotichal sine wave.
Done. My first 2200 '70s basic program in VS CODE!!!
Half century later.
I can add some nice touching, more waves same line SUBSTR(A$... more symbols... * % $...
nah
I wanna sleep
sine wave is relaxing
if only the headache dissapears...
True silence would be perfect, far from become reality. iiiiiiiiiii uuuuuuuuuuu eeeeeeeeeee ear, glugluglu sinus, mpbm! mpbm! mpbm! hart stop please
No, not you bum bum I would die, can you do it without me earing it as the last 60 years?
|190821| To-Do
Important funnctionality I forgot:
Method to show a record without pad request, e.g. a custom button that read or import data from a local file
...maybe...?
placeRead() forceRead() or putRead() ( cannot reuse setRead()!! set methods implement behaviour rather than inmediate response )
Dev draws data and then makes pad to enter in show mode. It can fire ERR if pad is in edit mode, but it would be too late.
...or...?
askForRead()
The crudpad checks if not in edit mode, then reacts with read() callback and awaits for cbResult()... but it would be async
and dev has to be prepared to do the local search instead of the standard read() Too much complexity added, No way.
|190819| To-Do
OK button onclick issue.
Update2:
setFormControl can ALL be optional!!!!
a big RECOMENDED instead mandatory. The cb inside were made to the app look professional.
blockinputs so user sees further edition is unusable, eraseinputs so user dont see his dirt after he cancels,
user CAN SEE that without them, but the more responsive app will be more appealing,
because those controls make him feel the app has his back.
Maybe later. to-do.
still node and mongo.
|190817|
OK button onclick issue.
without this line, user can modify after hiting OK and before the db result.
Wait gap can be long, being an async db operation service.
The PROBLEM: if user changes data after hitting OK, when db result finally blocks edition the showed data is corrupt.
// this._changeMode(this.MODE_LIST.SHOW) // prevents furter changes
with it, it blocks edition inmediatly. Nice!
The PROBLEM: if cbresult fails, inputs keep disabled even when mode stays as CREATE.
I want to let the user decide if he cancels or retries, so I cannot resend form_create() because it would erase the input fields
The VB6 version had another function in the interfase: editformEnable( treu/false) I drop it because I thought it was redundant
my bad
Possible fix 1: .hey( "hands off") enough to avoid user tampering I guess.
Possible fix 2: add devuser enableform() callback inside .setFormControl(), two flavors create/modify. Too dirty, if understable.
Possible fix 3: reread after save? Mmmm...
KISS: No fix. ItS eaSy to See, letS Say uSer Should See Such iSSue.
Update:
Should go by Fix 2. but unlike formBlockAllInputs, OPTIONAL.
If implemented, Ok sends blockinputs callback and if later enters in create mode again changemode sends unlock-inputs(create/modify)
If not, ok doesnt block, the block comes from db save result.
|190806|
Nothing new in the pad.
Async consideration when user aborts, fixed the test app
so unexpected search success after user abort dont overwrite eventual edit user input.
here:
Advance consideration. How bad is it?
Who owns the form?
When data needs to be shown, (from READ or NAV)
the drawing is inside the "user waiting" status and CAN be aborted by boring him (user dependent bored timeout).
So,
(a) the form should be drawn all at once after all the data is collected
and after checking if it wont be overwriting user input (edit mode)
if (crudpad.mode & crudpad.MODE_LIST.EDIT)
Note: Do the check on READ or NAV, dont do the check when form write is called from crudpad as form-erase()
(b) set insane see-abort-button timeout so user never sees bored button
(c) Do nothing.
So if:
user does a search.
then user aborts the search too early
then user starts to edit new data,
AND THEN the search finally arrives,
the user will loose the edited data and get "unexpected search success" msg from cbresult(). Do you care?
...
After more nodejs training I WILL replace shitty indexedDb by cloud atlas mongodb.
mmm...
What if I try it before nodejs?
I know, It would be CRAZY to put that code in client side in production,
but still... it can be fun. And something to show... And test everywhere... even poor smartphones.
Ah, the app server. Can glitch.com hold this?
|190726|
Need a partner.
From time to time I come here to see if something dissapeared... No losses so far.
I May think about implenting some new art...
The truth is I am overwelmed. Its no longer the 80's, I cant do all by myself.
Lie: I can. Discipline... and droping the shitty js in favor of something strongly typed
would keep bugs to minimun. but I cannot learn, code front, code server, code middle,
maintain it forever, being state of the art,
AND
to listen and to keep the customers happy.
Too tired even to see if my English is barely understable.
Who cares the English, this diary is not intended to be part of the project.
Mix of complains deposit / encourage server
Mmm.
I need to know if... No, i know.
I need someone to share the vision. Sharing the work could be nice too...
Sharing the profit is not an issue at all unless he/SHE turns greedy and starts to undermine the job
Paranoic? Nah. Lies, hidden incomings, emptied accounts, stolen code, stolen profits, checks whitout funds,
not my first time.
|190721|
git "curl 18 transfer closed with outstanding read data remaining"
ah, ok.
Some code then.
map instead of for, enclose setresult, clear timeout, silly things.
Didnt try the ideas.
Ah, delousing svg. Fun.
|190719|
No code.
Added some ideas...
--setPermissions(create, read, update, delete).
buttons could have status enabled /disabled / forbiden
Just for viewing, NOT a replace for server side auth.
--Can abstract MORE. virtualcrudpad, nothing but a class
dev draws his own buttons (or no buttons at all, can be tabs, menu items, test app, simulation,)
Still:
* send cbResult(), report success/fail
* setXXXX() fill frm & db callbacks, pure draw and db handlers.
* custom buttons (because of the active modes )
Plus:
* sendClickOn() wich (virtual or real) bt event he /has/pretend to have/ received.
* listen changemode event, get array bt with state changed enabled/disabled/hidden(/forbiden)
Sound complicated to use, it shouldnt be.
Just do the drawing and the method to change bt status, (classlist.remove/add !!)
then the connections (send bt, listen event), no more.
REAL FREEDOM
|190714|
Lot of structure, lots of commented code. zero bugs so far with the change.
Dev can translate easily, style with graphics.
...
Should I change names? so, Crud
btNew btCreate
btSearch btRead
btModi btUpdate
btDel btDelete
|190712|
Tired of node, so came here to play with svg.
Some fixes too.
Still hate js. More.
190629
wow
I was ashamed I couldnt use promises properly
But I invented it. _resultCall, setResultCaller( msg, modeOk, modeFail)
they set the wait for specific user response like a promise
I cant use promise because there are no functions with callback, if I implement it
it would be the other side of the promise plus it would lead to duplicated code, it doesnt fit well.
But still... Hard time trying to use the concepts, they keep escaping me. They seem always elusive.
IndexedDB for example...
People did hard work making the wraper to promises, google & mozzile put their examples with that wraper,
but I chose to ignore it 'cause I felt so comfortable doing the entire crud database with plain callbacks.
...
I wanted to jump to node
But I am still programming the old way.
CRUDPAD, a 3 months project for what I thought a week, I assaulted it the old way.
Didnt use my own classes and events. Hardly some objects.
freecodecamp didnt help after 400+ challenges, most exercises were old fashion algoritms,
not a word about asyncs way until frameworks training, frameworks you DONT need.
(really good un htm & css, plus the projects and the community, plus the big source of articles you can feed from)
It'll be long, but I'll take javascript.info seriously, not just as a reference.
AND
If my brain lets me.
Some easy free cloud db as test app... it would be a good seller. No need of my beloved sql.
Start studing node same time to do REAL work like this petty project.
Sorry pad pal, didnt mean it. Im pretty proud of you. You just need a few touches and youll be ready for the REAL fight.
190628
Big changes, bugstat job
Everything looks working.
Ready to release?
Nah, CSS...
And server part...
Need to see if it is usable with no modifications,
I know nothing about node separation client-server, how to tell where the render is.
...
wtf, without web, why, where were wifi, where the wickery went wandering I wonder.
...
backed up in phone.
what a surprise, db dont open. Chrome useless. Firefox, Opera,
they both show the form and the delousing svg monkey.
Node!!!! then db cloud
190627
I have to try this on test app.
Let's see...
...
Thougt I could
test generators in the test app plus implementig the missing nav.
But indexeddb didn't let me. Transanctions are short life.
It's ok, smart decition for a db.
...
There were very few errors to fix! If I had a compiler or at least a preprocesor (ts?) it could be BUG FREE. I hate js.
...
ESLint refuses to install
Worth the try
...
crudpad mostly untouched
anyway, not a lost day
fixed some test app issues,
indexeddb cursors learned (not that important),
implemented nav test.
nice.
...
CSS would take ages,
but if I do, It'll be ready to ship.
Not now.
190626
wifiwtf
ok, node can wait. Tst App nav.
Mmm. Not easy with no manual.
ok, some debug.
mmm.
wifis back.
too late, et already Broken
added some ideas too.
FOCUS!!!!!
ok, tomorrow. Need to fix this first.
190625
Ok. I need to understand js more. But this is not the right project to do it, async by nature.
Fix crudpad and move on: node, cloud sql, then the real app. A Sync friendly app, and how to resolve it with js.
TS, TS, TS... TS teasing me. JS is a mess. When should I do the move....
...
I think google asked their devs:
Here, who whants types, struct, clear paths to follow.
Here, whoever wants THE FREEDOM.
so, the first group were to golang, the other assaulted js.
Freedom sucks.
...
Everything looks working again.
Needs some work:
SHould I enhance panel selection?
implement nav test?
try await, or generators to replace _resultCaller?
Maybe make it usable, not so far from it.
fix css uglyness?
separate internal from custom css styling?
start version number?
Just jump to node, I'm very of track.
I'll be back.
190624 monday again
Debug is insane. I hate js.
From a entirely working program, turned to scrap after multiple refactor. It shouldnt be so difficult.
1 Real bug,
1 big " ()=>{this.f()} " onclick headache from the new event delegation (new headache replaced the old one)
7 from... SPELLING and stoped counting !!! Easy to fix, hard to catch.
I AM THE NO-BUG GUY. ONCE MY PROGRAMS COMPILE OK, THEY ARE ERROR FREE
I miss compilers and preprocesors.
I hate js.
Would it be faster if I move to TS?
...
wtf inedxeddb bug? store not found? I didnt touch it. Never used on zorrafogosa, but specs are the same.
store... bet updateneeded. Later.
...
Refactor: (still broken)
* Event delegation.
It Wasnt the simplification paradise. Coudnt avoid crazy ()=>{this.f()} they just moved
I decided to leave the many onclick "hidden" small _bt methods,
otherwise switchcase would have been too big. Its ok, they are completely standalone. The bug is js cant hide them.
* Constructor, defined vars (ok, props) inside (Why LET CONST not allowed? Who knows)
forced by zorrafogosa. GOOD! Structure is better.
* Big obj so store data from dev sets() instead of multiple _vars
They usually match dom objects. Why not unified obj?
Cause I dont trust in such overstore.
Some would be cleaner, like button labels, other more complex... leave them outside dom.
Broken, not working anymore.
Too much rewritting at once, and js sucks.
Need to fix now.
I am very tempted to play with svg, but it would be childish.
I would like to test generators... They look important. and cool. Another refactor.
But I need to JUMP TO NODE NOW
190622 after Breakfast
Why?
I used a BIG data object, just data, to persist.
I could have used many small persistent objects instead, say... OOP.
I didn't even consider it.
Should I?
No. It's ok, but I would have used that aproach if I were using them many times each.
In fact, they ARE objects inside .devStuff. but only hold data. They are strongly related to the DOM objects I cannot avoid.
Correct oop would have been extending DOM objects to hold my special properties: more encapsulation and fewer temp variables.
But... I don't trust it enough.
Same reason I took of then many onclick from the dom via delegation...
each button were holding its own onclick, but i dont use those anymore.
Resulted in not the clean code I expected but I 'll keep them outside.
Still, I feel... guilty.
I already have padButtons{} and customButtons{}. They hold the same DOM buttons. Is this a well designed structure?
190622
You may seem slow.
No. You are the FireTurttle.
You dont pop up forms, buttons and icons and pretty message boxes every single moment from the start.
You trace and follow a longer path.
But when you finally reach the front door past the garden, ready along with your well trained partners,
you'll see your careless mates already there,
still sitting and furiously cleaning the mud off their pants
and broken flowers from their shoes.
There is a better way, guys. Come on, I'll show you.
...
Ok, this is taking TOO long, but just because it is still a LEARNING project being refactored over and over...
Hope this lead to a strong infrastructure for future projets.
190621 diying (spelling..?)
Insane refactor, all the changes at once.
Big devStuff object instead of the many let from dev set(),
allowed css classes object !!!???? nobody would understand why. Im maniac.
delegation,
contructor reconstruction, from empty to all on me
and no way to test any of this until I finish them all.
...
Besides, delegation COULD have get rid of the many exposed onclick functions,
but it resulted in a insanely long onclick.
So: the many exposed this._bt() stay, clear and better code. Exposed because JS fault, not mine.
advantages remain:
just one lissening, (except custom buttons)
no onclick = ({()=>this._bt()}) trick,
no server (I mean future, no server code yet) functions names exposed as onclick in the dom... it could have been shadow but...
I wanna sleep.
190621 after nap
Decitions.
More element good taste.
(javascript.info is getting better and better, I love it).
I could set
functions via attributes (simil onclick) , then
connectedCallback to render
This would be a well designed custom element
But this element is too complex,
I dont like letting html do so much behavior set
Far more clear and easy to read,
crudpad.setUpdate(funFrmEdit, funDbUpdate)
inside js (SERVER side, SECURITY matters.)
than lots of attr inside html.
190621 No dark anymore... Morning? I'll get some coffee.
Test code? I never used it, still my programs were bug free.
I come from assembler:
You write the program, you compile it,
you put it in a PROM.
"It doesn't move" says someone.
That's the error message.
If you are lucky, the device has a led.
Then you check the eprom, then print the program,
maybe take it home to squizze your brain and figure out what's going on.
Thats the debug.
No magic numbers, no loose vars, no quoted parametrs, no standalone flags.
Strong naming (types? whats that? Not invented yet... maybe a C programmer can tell...)
Replace all of them and fill the preprocesor,
so the compiler CAN FIX most of your mistakes.
And no handwriting PROM, RS232.
When the code reaches the PROM, only conceptual errors remain.
I did the same in Wang Basic, dbase-Clipper, Access, VB6-SQLserver.
VS intellisense actually can be VERY intelligent if you write good code,
better than any linter can be if you are not strict.
strong naming, strong typing,
unique and easy to identify responsibles,
centralize responsabilities,
start the structure before the functionality,
and DO every tool you can help the COMPILER to understand your code.
"your code doesnt have bugs" a surprised boss told me.
It compiles. So no, never.
Until now. I hate js.
190621
DOM
I'm tempted to do the same (big object with subcategories) with the dom.
Create all elements at start, make them visible later if implemented.
Much, much clear...
Wouldnt be neither bug fixing nor learning nor performance tuning.
Just easier to read.
I should learn other options first, It seems I'm missing important stuff
regarding htm construction. Templates, shadow, I need to understand them first.
I'd rather finish this (this._dev_) first.
...
Hey, Firefox was a shock. So many js strong points, so many js flaws (I hate js)
AND proper etiquete.
No style, no frameworks, no good taste, nothing helps too much. Errors can be everywhere.
JS sucks. It is hard, but YOU have to be more strict in how to do things,
js does not help AT ALL.
...
190620
I hate js.
Big wash.
=Before. All internal vars (over 30) were set as this._var exposed properties, i didn't like it.
=Later I set all var as module let... so I no longer needed the "this._",
but dev needs"type = module" in his html, otherwise they all were global. I didn't like it.
more: the worst? BAD IDEA, I never meant to have multiple crudpads
but actually you CAN have 2+ crudpads, in diferent tabs, it wouldn work. I broke it!!!!
=Now. kill'em all. property again. Just one, a BIG one:
this._devStuff.category.item
functions, flags, texts, buttonNames, messages,
all what dev had set via methods, all of them inside _devStuff. Still exposed, I still dont like it,
but data has far better structure (from none) now.
larger text? Not so. var names are shortened because of the known context.
this._devStuff.update.funEdit()
Still over 20 this._function() internal exposed methods, (no related to dev sets), I won't do anything here...
unless I apply delegation...
I WISH it would lead to better code control, but JS don't care.
You can do anything, js wont stop you from breaking everything.
Freedom sucks.
I hate js.
190618
Why the gap... I dont remember
...
Re-learn is getting hard
Dont trust anyone. Too much new stuff, too many wrong explanations.
freecodecamp:
Ok, more than ok if you DO the training projects there and you want to apply for a job,
since there will be directives about HOW they want you to do things.
modules, promises, async, generators, I got all wrong or missing.
So if you wanna do in the wild by your own, with minimun interaction (mostly google & stackoverflow, usually out of date)
you need far better infrastructure. Badly.
javascript.info is getting better and better, in deep, up to date and mainly accurate info,
both the how and the why.
I look my current code here and I feel ashamed...
But Chrome let me!
My fault either way.
Need to fix, need an apocalliptic refactor... need a better understanding first.
Still hate JS. More than ever cause you can do it ALL WRONG and it still works.
190616
Dont trust GOOGLE DEVELOPERS. They lie, they have reckless implementation, they got the loosy view of specs.
They let WRONG things work.
instead
mozilla got it right.
firefox fire err when they should, then work as they can because thats the internet way.
I know much is js lang fault (I hate js), some are no yet implemented functionality,
but they dont do things worst.
developer.mozilla.org is better in every... thing.
I'll fix scope, modules importing, class, htm,
.THEN I'll move on.
Promise
...
WTF
wifi again
FY movistar
...
Sorry Movistar, I just learn all the country went to darkness. Not just the country, a couple of neighbor countriies too.
A few hours without XXI century conectivity in South America on sunday, I wonder if milenials survived the hunger. I would have recommended them
just go to sleep until electricity comes back
Reminded me "Destruction" from Barjavel.
190614
No node yet. Thanks to FogosaZorra i'll be here for a while.
She has better checks. But accepts fewer things, not sure if that is right or wrong.
...
So far (still 0 code) liking Typescript, lot of concepts I dont understand, just the TYPE thing sells me a lot. I hate JS.
...
Need more JS, going to javascript.info to get them. freecodecamp is not that good.
async, modules, big project struct, generators...
Vue & TS look good... fit me.
But I need server side more.
quick firefox fix then server long journey. later,
fork node version, ts, generators
lot of refactor I am SURE i will not do with plain js. (I hate JS I think I already told that)
190612 after nap before Lunch
oops...
la zorrafogosa...
does not support "fields" (?)
meaning properties with/wo 'this.' inside class body ouside constructor.
Mmmm. Is it ok?
VSCode does not complain,
Chrome works with not even a warning.
I would applaud if it forces me to declare them... (but I still cannot use let/const)
but inside the constructor seems to ignore declaration, work with/wo "this." and wo "let", no issue.
Its all the same, but less.
Umpf.
I'll be around some longer...
...
How is it supposed to use let?
inside constructor as properties with this. ?
outside class as global let ?
what about methods...
190612
Dear diary.
freecodecamp js training sucks. For me, a vanilla guy.
-js, after a dozen discouraginly boring if() challenges, 'let' and a couple of silly challenges,
it jumps to challenge on method concatenation and map() with barely any explanation,
solved reading specs, discouraginly hard if you dont have the missing training.
-No word of ASYNC. COME ON! What defines JS. You get there only in the framework training.
Frameworks oriented, too much framework stuff you dont need.
Ah, they dont get the meaning of "user stories". They use it just for low level requirements,
it is an important concept when you deal with customers.
but
I guess it is PERFECT for getting a job.
The frameworks palette.
They use projects as learning tool, this is GREAT. MY BAD: not to use them and jump to this my own learning project,
so I remember almost nothing of their js & css advanced topics I learn with challenges success.
...
javascript.info !!!
I got best of js concepts there. I should do its entire long training.
I could help transalating to spanish, the best, learning and helping.
I just got GENERATORS there.
I can branch this prject to test...
Here I call an async function from Dev then I need to react (? wow I get it, React) when it finishes.
Tried a promise-like solution (from the other side), I failed.
I wrote _callRequest() to set what I expect and behave after Dev answers resultOk(), similar to a CB. It worked.
I can use generators instead, yield, then next() with the resultOk() arriving, all inside the same function,
safer than setting what I expect: better code.
Dev wont see any difference, he needs to answer his async with resultOk() when he receives the CB.
Mmm...
I can send the generator object to Dev's func then ask him the same obj inside the result().
Simple ask. Woudnt be hard. And my reaction to result() answer wont longer be an almost blindly guess,
good bye unexpected result after timout or bored-abort button, no danger of bugs answering the wrong question.
Far better code.
But Dev's.... crudpad.resultOk(objWannaMyRawGeneratorObjBack, boolTrueFalseSuccesOrNot, textMessageToFinalUser)
Mmmm...
Added. If I survive node training.
...
190611
Working version. Time to start log...
Do I need it? Uhm... No. I'll do if crudpads were used by me or others.
To-do list & bug list,
done & philosophical done (meaning cheat to-do drop)
will do instead.
Time related, this diary. It makes me remember concepts better and take stronger design decitions.
e.g.
Philosophilcal drop of focus behaviour was prematurely triggered.
Will it be implemented? No. But the thing will move away from philosophical done.
...
Woa, the lots of thing I left if I want crudpad to be a respectful element.
It cannot be. Is Nearly an app. Its rather a... reusable component?
I decided from start not to use events for dev in favor of function parameters,
far clearer for dev to set behaviour.
I didnt use attr to set things either, too complex and the html would be too long and difficult to read,
it is clearly oriented to js.
The only attr I used is data prop in custom buttons,
(stored in the dom but transparent to the user) but I could have used js vars instead,
maybe extend the button to have a modesActive prop. No need.
Ok.
This writting helped:
I am ok with the decitions.
Even it doesnt make too much sense to be a custom element extend class,
the very first shot was to inject html inside a div as pure text and it seemed to work very well
and I am afraid... Wouldn it be FASTER? To let chrome understand the text and create everything internally,
rather than so many object creation and addChild...
then manipulate everything from js is all the same.
I thought manipulate objects from desingn would be safer than text, but JS (I hate JS) does not help AT ALL.
...
Crudpad seems ok, but it is not an abstract project.
It is part of the big, real life cloud app for cloud bussiness.
...
Now.
Long goal and its path is clear, what to do RIGHT NOW after finishing debug list is not:
-Take js training again.
It would be far more productive now, there were too many new concepts then.
(for a sqlserver2003+vb6 developer)
-Rebuild the project
to meet the custom components good taste & etiquete, using concepts related to that,
like the shadow dom (I dont get it) and this thing that filters events fired I dont remember the name.
-What about pwa. No. No yet. Focus, I'm a server side guy.
-Replace the now working indexeddb with real cloud.
Do I have free cloud sql? Unlike indexeddb real cloud would be a rock seller.
-Just jump to node.
then refactor this project to make a clear separation between client and server request.
Building the crudpad and its abstracted requests inside the client IS SAFE,
but to code the db operation (like the test app here) client side IS NOT.
It took two months plus the (faulty) freecodecamp trainig to get here.
next typescript (?) (I hate JS), Node , framework client (?), framework server (?), sql cloud,
(Im ok with nosql, easier and maybe cheaper, but my apps fit sql better), unknown challenges,
then THE app.
But I want money from this next week.
So stop crying.
...
Uh... Breakfast time already? I should fix my insane circadian cycle.
Having a bug-lag.
...
smooth debug ,
lot of improvement left.
no known js bugs, css need to improve to be in production.
some ideas. Scariest one: Erradicate all class htmlelement extension, make it just a function.
I wanna jump to node. Maybe more productive if I leave crudpad refining after learning server part.
-commit-
190609 after wine
Some refining, pretty well.
Some bug enumeration, easy to fix, but prefered to give time to be creative making the bug list :)
Now there is a refined to-do list.
the remaining 20% in 80% of the time rule? After TWO months???? No way.
Has to be presto.
190609
challenge: touch & drag the toolbar to a new position. left, up, right. Not my current scope, but...
...
is there a -lint- extension for vscode? pretty sure there is. Surely CANNOT fix many things,
but may help. Or give some advice.
WOA!! its overwelming. need to learn about scoring now? Nah, just ask google.
...
readme looks ugly. DO I HAVE TO LEARN GIT MARKDOWN TOO??
...
Delete button... doesnt delete... testapp bug, ok.
HEA! bored button stoped working!!!
...
Mmm...
indexeddb too fast.
How can I test async delay? Any atempt stops the js execution so waiting panel is a noshow.
Thx stackoverflow! setTimeout(function, milliseconds); is async.
...
moved to-do list to zzBugStat.txt
...
It Worked!
()=>{this._btTired()}
parameter is (some) better than
{let tt = this; this.btTired.onclick = function(){ tt._btTired()} } // me cago en el yavascrít
...
tooltip (title attr) for custom buttons
...
190608 after nap. WORKING VERSION
indexeddb with events
no control nor trycatch
working Anyway
...
css un/disabled should be more pronounced
css hey() should flash when changes
confirm should fire error OR let one of the two cb to be empty. Do nothing makes sense
didnt test button naming param, bet lot of spelling errs
...
custom buttons noshow.
customButtons.lenght not defined !!!!!!!! SPELLING AGAIN hate js
this.customButton not iterable SPELL FY!!!!
bot.dataset.estados SPELL FYFYFYFY!!!!!
Working now. ALL JS FAULT.
Reckless css is getting ugly.
...
Only nav buttons debug left
need to implement cursor in test app
...
LOL
I got it wrong. Create Read Update Delete
Ok, I'll change names and test to fit it.
If I a dont the function names would be misleading.
Oh No!!! JS fucking var freedom wont help!!!!!!!!!
anyway, has to be done.
...
In slowmotion, jumps too much. Shouldnt.
Maybe is just putting defaults at pad creation time,
and check if the there is a "disable then enable" line
...
But it IS working.
VERY few bugs.
check to do
then some shining
and ready to the next step.
190608
Replacing waiting panel is becaming a priority factor.
Its Ugly
Too agresive and anoying, even for a temporary thing. It hurts me.
It would fireup the user bored factor and force him to hit the abort bored button.
I have to steal a nicer svg. Not a gif please. I want everything scalable,
CEO wall screen desktop, minion 5'' pad like my phone.
SAME app. It's what I'm commited to sell.
...
SQL. Is it a problem?
Nosql are easier to maintain, easier to spread, easier to make them independent from... everything.
The prehistoric Nosql is now the new thing, because most of the data today fits nosql better.
...
Cant find the bug indexeddb, a big one.
Some things started working when I went to specs, not examples. And after hack the browser.
I dont want to learn it.
All cloud db seems paid.
1 year free? looks ok. Maybe not starting now. Nosql? Mmm.
I can do nosql. But my data fits sql better.
And I have a clear ,very specific, goal.
Mmm.
Even when indexedDb woudnt be useful even as a cache. One Don google may delete whenever he wishes just because.
check: Sql, free, secured & well known (the service I wanna sell),
the customer has to see a well working demo, he goes to home, uses the phone after dinner, he can edit his same data, same app.
data secured by something he can trust: MS, Google, Amazon(after little research) .
And the customer app server? Where do I put it? Strong user auth. Login MS, integration to Office Cloud is nice.
Forget your lan issues and troubled servers Even datacenters.
Servers down, inet provider down, trasportation on strike, building on fire, who cares. You have a phone?
Buy my service, secure your data so you dont need me, in MS cloud.
amazon + redhat, then azure?
I already have redhat account... but I was too "raw" then. "green" is the word? inmature? unbearded? need a context traslator.
I can do research after learning node.
Yet I am short on real world practice on js promises and js map
indexedDB... puf.
Lets finish this.
190607
dark side outside
...
button naming. careful.
should give 2 options, text inside functions is handy, using textContent to avoid problems with simbols like nav << < > >>
and other centralized, maybe json, to set innerHTML so can buld iconic buttons and replace more hidden texts like alerts
...
debugging tricky indexdb, going well. You need to hack your browser.
again, most bugs are from spelling. Some from context, but the same source: shitty js.
...
getting hard.
Need a bigger screen. Chrome has Too many debug panels, all needed. And needy.
...
WTF
indexeddb store not found,
and
object store with the specified name already exists.
same var
...
190606 again.
Noisy. Bright. Day. 10:30.
Why did I wake up? Does it mean I was sleeping?
Well, who cares Im not getting paid for this.
Lets start with the out of place error message.
...
_setResultCaller()
getting rid of fakepromise. good.
Coudnt resolve via promise nor cb
Guess I did it the better way possible,
secured I hope with a caller list
I cannot know now where the result comes from
but I know the result I can expect
What to do whit the needed and implemented bored abort button...
just a message if result finally arrives
GREAT! I changed 'unexpected promise' by 'unexpected result'
...
Cant follow.
Something looks very wrong in the flow.
...
Just broke the panel
...
It's back. ok, start again
...
Im stuck.
cause I dont believe is not working.
Should I commit a failure.