Turgid verbosity is better than brevity.
Multiple lines of code are better than concise simplicity.
Mid-1980’s software techniques are better than modern adaptable technology.
Many legacy libraries are better than clean organization.
Slow, costly development with large overhead is better than agility.
It’s better to type lots of soul-deadening crap having the grace of four-day old road kill than to quickly solve a problem.~ Zen of Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Header": { | |
"Time": "2022-09-14T12:20:17-07:00", | |
"ReportName": "ProfitAndLoss", | |
"ReportBasis": "Accrual", | |
"StartPeriod": "2022-06-01", | |
"EndPeriod": "2022-09-30", | |
"SummarizeColumnsBy": "Total", | |
"Currency": "USD", | |
"Customer": "1", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHOW INDEXES FROM `room`; | |
--ALTER TABLE `room` DROP INDEX room_code_restriction_idx; | |
--ALTER TABLE `room` DROP INDEX room_user_restriction_idx; | |
ALTER TABLE `room` DROP FOREIGN KEY room_code_restriction_foreign; | |
ALTER TABLE `room` DROP FOREIGN KEY room_user_restriction_foreign; | |
ALTER TABLE `room` DROP COLUMN `code_restriction`; | |
ALTER TABLE `room` DROP COLUMN `user_restriction`; |
Try these instead:
There's no documentation for this, but it just so happens that if you use the @callback
alias some extra machinery kicks in and you can type functions as you would have expected.
/**
- * @typedef {Function} PersonGreet
+ * @callback PersonGreet
* @param {String} name - other's name
* @returns {String} - the greeting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function escapeHtml(str) { | |
// TODO more | |
return str | |
.replace(/&/g, '&') | |
.replace(/</g, '<') | |
.replace(/>/g, '<') | |
.replace(/'/g, ''') | |
.replace(/"/g, '"') | |
; | |
} |
Random code snippet sample examples for screenshots, thumbnails, YouTube, Twitch, etc.h
Convert to screenshot with:
The for
loop outperforms the binary search.
(well, the forEach
did, until we changed the caching in an unrelated function)
And the optimizations have (almost) nothing to do with the algorithms.
(changing any code can massively change the performance of any benchmark)
See the video: https://www.youtube.com/watch?v=0mmi44ZB2C0