Aussie living in the San Francisco Bay Area.
Coding since 1998.
.NET Foundation member. C# fan
https://d.sb/
Mastodon: @dan@d.sb

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

help-circle



  • People tend to hate on PowerShell but it’s cross-platform these days, and far easier to write than shell scripts once you understand the syntax.

    You can pipe objects between functions, rather than just string streams like in Bash. Often there’s no cut, sed, grep, etc needed as what you want is probably a property on an object.

    It’s not just a basic scripting language like Bash. It’s built on top of .NET, so most of things you can do in C#, you can also do in PowerShell (and if not, you can call into C# code).

    It’s especially popular for administration of Windows systems - if there’s anything you want to do on a Windows system, it’s likely there’s a PowerShell module for it.


  • there was no resume!

    IMO the HTTP Range header (the thing that lets you resume downloads) was one of the best innovations back then. It let the client tell the server where to start the download from, and how much of the file to download. This means it also let you speed up downloads by downloading multiple pieces in parallel. I used to use a program called GetRight and loved it.

    We still split up downloads like this today. These days, internet connections are often fast enough that you can’t reach full speed with a single connection, so speed tests and things like Steam will open multiple concurrent connections for their downloads to maximize download speed.


  • I hosted my personal site using Mono over 10 years ago now and it mostly worked well. I contributed some code to Mono to fix a few edge cases where their behaviour deviated slightly from Microsoft’s.

    Of course, I couldn’t actually look at Microsoft’s shared source code when doing that, so I had to just observe its outputs. At the time, Mono code had to all be clean-room implementations, since Microsoft’s shared source program, where they released parts of the .NET Framework 4.x source code publicly, had a very restrictive license that didn’t permit reuse (it wasn’t open-source). Even just looking at the code meant you couldn’t contribute to Mono.

    I was very happy when .NET Core was announced and switched to a beta of 1.0 as soon as I could.


  • It’s not as common any more, but there’s still things using logic programming languages (Prolog and similar) even today.

    Java uses it in the type checker. From the JVM spec:

    The type checker enforces type rules that are specified by means of Prolog clauses.

    There’s some other compiler and NLP (natural language processing) use cases for it too. I’ve seen some companies use it to define restraints for their business logic, which isn’t too different from the type checker rules use case.

    It’s definitely fallen out of common use though.







  • I write it in lowercase but then the auto-formatter we use at work converts it to uppercase when I save the file.

    I love auto formatters. Prettier (the initial version for JS) really popularized the concept. If the coding style is automated where possible (things like tabs vs spaces, tab width, line wrap at 80/100/120 characters, where to put line breaks in long statements, etc), it ensures the entire codebase is consistent, and I can jump between different code bases with different coding styles without having to think too much about it.




  • You don’t “program” things with SQL

    Why not? It sounds like you haven’t written any OLAP queries :)

    I’ve written ETL data pipelines using a system similar to Apache Airflow, where most of the logic is in SQL (either Presto or Apache Spark) with small pieces of Python to glue things together. Queries that are thousands of lines long that take ~30 minutes to run and do all sorts of transformations to the data. They run once per day, overnight. I’d definitely call that programming.

    Most database systems support stored procedures, which are just like functions - you give them some input and they give you some output and/or perform some side effects.