• 0 Posts
  • 29 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle




  • I want contrast

    Sure, but you can also have contrast with a dark background that isn’t constantly shooting a third of the photons your screen can generate (or more, since in some screens blue pixels are the largest), and the most energetic at that, at your eyes… high contrast themes tend to have a black background (not a gray one like most dark themes) precisely as a way to maximise contrast…

    (It was even worse when we sat all day in front of a fucking particle accelerator, of course; frankly, as much as I loved CRTs’ ability to work with multiple resolutions I don’t know how we didn’t all end up going blind…)








  • As someone used to working in c# (and before that Java, C++, Visual Basic, and Pascal) I haven’t seen any brace or semicolon related errors since the days of Borland IDEs (any remotely self respecting IDE will highlight them and refuse to compile, these days), but working with Kotlin has shown me that I, at least, read code with semicolons slightly faster than code without.

    There’s a reason we use punctuation when writing, and the same applies to code.




  • Thinking about C# and Dapper here 'cause they’re what I’m used to, but, for example…

    result = await connection.QueryAsync<ResultType>(QUERY); (where ResultType is a statically typed record, class, or struct shaped like the data you want returned.)

    Given a query that doesn’t return something that matches any of ResultType’s constructors, the code’ll throw an exception at runtime complaining it needs a constructor that matches whatever it’s returning, whereupon you’ll notice it isn’t asking for it to have a date parameter, so the query must not be returning it.