My foremost goal with blogging was to write well-researched, in-depth opinions/pieces. And that’s what I still do. However, every day I face plenty of small annoying problems whose solution involve some struggle. In most of the cases, they stay unwritten. It might not be obvious, but writing this stuff has the potential to save immense effort of the people facing the same issue. This sub-section is exactly for that—writing stuff related to programming, design, math that I learned today.
I have been using Jinja for my side-project and was surprised to find that there’s no way to uppercase only the first letter. There is a capitalize filter but it also lowercases the rest of the letters—something you wouldn’t want if your text has acronyms or proper nouns. Jinja doesn’t support sentence case by default, but thankfully it’s not hard to recreate that. Jinja supports Python’s string manipulation syntax, so we can leverage that for our sentence casing.
UIKit has become my de-facto standard for any new project. It’s simple, the default look is refreshing, and there are tons of useful components and utility classes. In most cases, it gets the job done without getting in the way. However, coming from the bootstrap world, one thing I dearly missed was the collapsible navbar. In Bootstrap, the default navbar becomes a hamburger menu on smaller screens. Large screen:
Subresource Integrity is a new security feature that safeguards websites against tampering of a script/stylesheet at the source. Say, you want to include a script from a public CDN, but you also protect yourself against potential manipulation of the code after you have included it, SRI is the way to go. The feature gives the developer the ability to add a hash-sum with the script tag. Before the browser loads the resource, it will match the hash-sum of the content with what is specified in the tag.