/Tips

Naming Conventions In Programming – A Review Of Scientific Literature

- Iwo Herka tl;dr: This article is divided into 2 chapters: (1) “Introduction to naming in programming”: A review of scientific literature present on the topic to deepen your understanding of the current body of knowledge on naming things. (2) “Guidelines for naming conventions in programming”: recommendations to improve your skills in choosing thoughtful class, function or variable names.

featured in #397


PSQL Tips

tl;dr: 43 tips starting with: (1) If you want to simply send a single line command to psql and exit, try using the -c or --command=command flag. (2) You can combine several -c or --command=command flags to execute several commands or queries. (3) With the --csv flag, psql will display the result as a csv file. And more.

featured in #392


Examples Of Problems With Integers

- Julia Evans tl;dr: Examples of integer problems that Julia discusses are: (1) The small database primary key. (2) Integer overflow / underflow. (3) Decoding a binary format in Java. (4) Misinterpreting an IP address or string as an integer. (5) Security problems because of integer overflow. (6) The case of the mystery byte order. (7) modulo of negative numbers. (8) Compilers removing integer overflow checks. (9) The && typo.

featured in #384


Examples Of Floating Point Problems

- Julia Evans tl;dr: Julia wanted specific examples of floating point bugs in real-world programs and asked folks for "examples of how floating point has gone wrong for them in real programs." This post shares 8 examples of such problems. Julia writes programs to highlight the problems and ways to solve them. 

featured in #383


A Beginner’s Guide To Chrome Tracing

- Nolan Lawson tl;dr: Chrome tracing lets you record a performance trace that captures low-level details of what the browser is doing. It’s mostly used by Chromium engineers themselves, but it can also be helpful for web developers when a DevTools trace is not enough. This post is a short guide on how to use this tool, from a web developer’s point of view. I’m not going to cover everything – just the bare minimum to get up and running."

featured in #383


A Neat XOR Trick

- Matt Keeter tl;dr: "With this last trick, we're down to O(N) running time, with no dependence on the window size! I didn't do rigorous benchmarking, but one reply said that this trick sped up their code by almost 3x. There's no moral to the story, other than "xor is cool"."

featured in #376


Tips For Analyzing Logs

- Julia Evans tl;dr: 14 useful tips including the following: (1) Search for the request’s ID - often log lines will include a request ID and searching for the request ID of a failed request will show all the log lines for that request. (2) Build a timeline - keeping all of the information straight in your head can get confusing, so keeping a debugging document where I copy and paste bits of information.

featured in #374


HTML Tips

- Marko Denic tl;dr: Marko shares 18 tips, including: (1) The \`loading=lazy\` attribute. (2) Email, call, and SMS links. (3) Ordered lists \`start\` attribute. (4) The \`meter\` element. (5) HTML Native Search. (6) Fieldset Element. (7) Window.opener.

featured in #356


Monitoring Tiny Web Services

- Julia Evans tl;dr: Julia's goal is to spend approximately 0% of time on ongoing operations for "tiny unimportant websites," writing a program that does 3 things: (1) An uptime checker. (2) An end-to-end healthcheck. (3) Automatically restart if the healthcheck fails.

featured in #343


CSS Tips

- Marko Denic tl;dr: "CSS tips and tricks you won’t see in most of the tutorials," such as creating the typing effect with no JS, using the drop-shadow filter function, smooth scrolling with one line of CSS and no JS. And more. 

featured in #309