Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Microsoft: Saving you time by making you type more

Microsoft: Saving you time by making you type more

Scheduled Pinned Locked Moved The Weird and The Wonderful
designcsscomgraphicsiot
1 Posts 1 Posters 9 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    honey the codewitch
    wrote on last edited by
    #1

    System.CommandLine Someone recently asked me about this, and had never heard of it. Now I know why.

        var fileOption = new Option(
            name: "--file",
            description: "The file to read and display on the console.");
    

    // ... followed by tons of boilerplate to put the args together

    I could have parse --file faster with a string switch inside a while loop. Or done this (my code):

    [CmdArg(Name="file",Description = "The file to create. Defaults to ")]
    static TextWriter OutputFile = Console.Out;

    I've just specified more information than microsoft (a /file arg and a default value) in less code and I even omitted their boilerplate garbage from the above. I'm sorry, but who in the heck are they hiring these days? I used to work on their development tools. I remember that it was important that they actually saved you time. That mattered to my super. What gives?

    Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups