Skip to content

Instantly share code, notes, and snippets.

View alternatives-to-katacoda.md
@bmaupin
bmaupin / reasons-not-to-use-windows.md
Last active Aug 20, 2022
Reasons not to use Windows
View reasons-not-to-use-windows.md

See also: Reasons not to use Windows 10

  • In Windows, files that are in use cannot be modified
    • As a result, Windows updates have to happen when the computer is not in use, such as during shutdown or boot (often both)
      • Compare to Linux/macOS, which can install updates while the computer is being used 😎
  • Windows command line has a length limit of 8191 characters
  • Windows uses backslashes (\) as file system path separators
    • All other modern operating systems (macOS, Linux, Android, iOS, etc) use a normal (aka forward) slash (/) and use backslashes for escaping
  • Windows can't run Docker containers natively
@bmaupin
bmaupin / javascript-xml-parsers.md
Last active Apr 6, 2022
JavaScript XML parsers
View javascript-xml-parsers.md
Parser Maintained Node.js Browser Streaming Types Notes
sax yes yes yes? yes DefinitelyTyped API is callback-based and a little cludgy, but it has streaming and is very fast
xml2js yes yes yes no DefinitelyTyped
@xml-tools/parser yes yes included Automatic error recovery
fast-xml-parser yes yes yes no included No streaming, ignores attributes by default, weird attribute access syntax (tag['@_attribute]']), some people have moved away from it (1, 2)
@rgrove/parse-xml yes yes yes no included Crashes on 302 MB XML file
[xmldoc](https://github.com
@bmaupin
bmaupin / programming-languages.md
Last active Jun 20, 2022
Thoughts on programming languages
View programming-languages.md

ⓘ This list is more-or-less limited to languages I have personal experience with

C#

  • Recommended?: 👎
  • Pros
    • Like a more modern Java without a lot of Java's problems
  • Cons
    • Although it is now open-source with .NET Core, a lot of existing code and libraries aren't compatible
    • A fully open-source .NET/C# seems to conflict with Microsoft's priorities: Can we trust Microsoft with Open Source?
  • See also: Is .NET an open platform yet?
@bmaupin
bmaupin / ui-component-libraries.md
Last active Mar 1, 2022
UI component libraries
View ui-component-libraries.md
@bmaupin
bmaupin / 2022-russian-invasion-of-ukraine-maps.md
Last active Apr 21, 2022
2022 Russian invasion of Ukraine maps
View 2022-russian-invasion-of-ukraine-maps.md

Latest Latest Russian invasion of Ukraine map

2022-04-08 2022-04-08 Russian invasion of Ukraine map

2022-04-01 2022-04-01 Russian invasion of Ukraine map

2022-03-24

@bmaupin
bmaupin / javascript-date-time-gotchas.md
Last active Nov 24, 2021
JavaScript date/time gotchas
View javascript-date-time-gotchas.md

TL;DR

  • The general consensus seems to be use UTC everywhere and convert to the local time zone when displaying dates/times to the user
    • UTC isn't perfect; aside from leap seconds, the biggest issue seems to be when local time zone rules change, making dates stored in UTC inaccurate
  • When passing timestamps over the wire (e.g. to/from an API), convert them to strings using an unambiguous standard format that includes the time zone such as ISO 8601
    • In TypeScript/JavaScript this can be accomplished using Date.toISOString(). Use new Date(dateString) to convert back into a Date object
  • In the cases where the time zone is set to UTC but a local timestamp is needed (e.g. to represent "today midnight"), a library may be needed: https://momentjs.com/docs/#/-project-status/recommendations/

[new Date(year, monthIndex, day)](https://developer.mozilla.org/docs

@bmaupin
bmaupin / modern-native-compiled-languages.md
Last active Jul 14, 2022
Modern high-level languages that compile to native binaries
View modern-native-compiled-languages.md

Goal

A simple way to write native applications (particularly CLI applications but optionally GUI applications) in a modern language (e.g. not C++/Qt) that's fun to use (e.g. not Go). This is primarily for small utilities where speed isn't a big concern. Binary size is a mild concern. Most of the rest is just icing on the cake (cross-compile support, etc).

Summary

Language High-level Garbage-collected Cross-compiling REPL Backed by large organization Cross-platform GUI library Comments
👉 TypeScript with pkg yes yes yes yes yes yes This isn't really "native" but may be the best option for something quick and dirty without having to resort to less-fun languages (like Go). See test-javascript-executables for ways to get the binary as small as possible.
Kotlin with GraalVM yes yes [no](https://github.com/oracle/graal/
View kobo-support.md