gemini://://gemini.tuxmachines.org/n/2023/02/18/Programming_Leftovers.gmi
View on Gemini

Tux Machines

#

Programming Leftovers

Posted by Roy Schestowitz on Feb 18, 2023

###

Retrospectives Antipatterns

###

Fixing “Too much WIP”. “too much WIP” means too many things… | by Jason Yip | Jan, 2023 | Medium

###

Re: Factor: Proquint

###

Simple Physics-based Flight Simulation with C++ | Jakob Maier

> Creating simple but realistic physics-based flight simulations from scratch with C++ and OpenGL.

###

The Real C++ Killers (Not You, Rust) | HackerNoon

> Technologies that can replace C++ in the near of far future are not compilers. They are Spiral, Numba, and ForwardCom.

###

How C++23 changes the way we write code - Timur Doumler - Meeting C++ 2022 - Invidious

###

Named Booleans prevent C++ bugs and save you time

> During a recent code review I found a hard to spot bug, a misplaced parenthesis in an `if` statement. I often employ a technique I call `named booleans`, which would have prevented this bug. It's a simple technique, instead of a long `if` statement, give every comparison a seperate boolean variable with a descriptive name and use those variables is the `if` statement. This post shows the bug in question, an example of my `named booleans` technique and another tip regarding naming magic numbers.

###

The Heisenbug lurking in your async code - Textual

###

Modularizing React Applications with Established UI Patterns

###

Python Check If String Contains Substring From List

> To check if the string contains substring from the Python list, the “list comprehension”, the “any()” method, and the iterative function “for” loop is used.

###

Divide Two Columns Pandas

> To divide two columns Pandas in the Python, the “/” divide operator, “div()” methods, and “np.where()” methods can be used.

###

Convert 1d Array to 2d Array Python

> To convert a one-dimensional array into a two-dimensional array, the “reshape()” method, “np.reshape()” method and “np.arange()” method can be used.

###

Remove Number From String Python

> To remove the number from the string in Python, the “join()” and “isdigit()” methods, “translate()”, “filter()”, and “sub()” methods are used.

###

How Do You Repeat a String n Times in Python?

> To repeat a string “n” times in Python, the repetition “*” operator, “for” loop an iterative function, and user-defined function can be used.

###

How to Initialize a Dictionary in Python

> To initialize the dictionary, “fromkey()”, “defaultdict()”, “setdefault()”, “dict()”, “zip()”, passing arguments, and curley “{}” braces techniques are used.

###

Datetime Get Previous Month Python

> To get previous month's datetime in Python, the “datetime” module with “replace()” method and “datetime” module using the extension “dd” techniques can be used.

###

Initialize 2D List in Python

> To initialize the 2d list in Python, the “range()” method and “numpy.full()” method with the “tolist()” method are used.

###

Remove Quotes From String Python

> To remove the quotes from any Python string, the “for” Loop, the “replace()”, “re.sub()”, “strip()”, “Istrip()” and “rstrip()” methods are used.

###

Why I'm not the biggest fan of Single Page Applications - Manuel Matuzović

> Sometimes it seems like accessibility experts and other web professionals hate JavaScript. This might be true for some, but most understand that JavaScript can be useful for improving UX and even accessibility. JavaScript solutions are often more accessible than their pure HTML or CSS counterparts.

###

Jussi Pakkanen: PDF output in images

> Generating PDF files is mostly (but not entirely) a serialization problem where you keep repeating the following loop:

>

> This means that you have to spend a fair bit of time without much to show for it apart from documents with various black boxes in them. However once you have enough foundational code, then suddenly you can generate all sorts of fun images. Let's look at some now.