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
D

Davyd McColl

@Davyd McColl
About
Posts
103
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • GitHub Copilot...
    D Davyd McColl

    And another study I saw the other day contradicts that email: [Study shock! AI hinders productivity and makes working worse • The Register](https://www.theregister.com/2024/07/26/ai\_hinders\_productivity/) That study mirrors my experience, tbh. I've found "ai-powered" code tools to create more work than they take away because (a) I'd say about 50% of suggestions are completely wrong and the rest are either trivial or subtly wrong.

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge question ai-coding

  • Can a student that can't even handle freshman calculus possibly be a good programmer?
    D Davyd McColl

    yes unless they're aiming to into a math-heavy field like building game engines or simulators, there's a good chance they'll never even need any higher-level math speaking from 25 years as a paid programmer

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge business question

  • The ethics of Open Source
    D Davyd McColl

    1 because I'm not here to police others and I don't want anyone having to think to hard about if they can use my opensource stuff. It's why my license of choice for my software is bsd-3-clause, basically saying you can do what you want with it, except take credit for it, and if it breaks, you can keep all the pieces.

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge question business help tutorial career

  • Need free VS tool which generates code documentation for me!
    D Davyd McColl

    and people wonder why, when there is documentation, a lot of the time, it completely sucks ): fwiw, typing `///` in Rider (and, I'd assume, in VS, using ReSharper) automatically inserts an xmldoc skeleton, like so: ```C# /// /// /// /// /// /// public int Add(int a, int b) { return a + b; } ``` so one could do the following, which I do in my personal library projects because I'd like there to be intellisense documentation, and some day I'll find a tool that generates a nice html site out of that xmldoc (there are some, but I haven't found one that is free and any good - I may have to resort to writing my own): 1. enable xmldocumentation in the project 2. update the csproj, as early as possible, with: ```XML true true ``` 3. When creating a new method, or in response to build failure, do a triple-slash over the method and try to think of anything useful that could go in the summary. Sometimes it will be obvious, eg "Adds a and b and returns the result" - but I find that having to think about it, a lot of the time, there are useful summaries against my methods. I want full xmldoc for my users, but I agree there are times when the method seems quite obvious - so this is what I do there. At least following the above instead of just running a tool invokes the random chance that your documentation is actually useful. Certifications that require documentation without any stipulation of usefulness seem like a complete waste of time: - for the OP, certifiers and the users. - OP has to run a tool or write some code. - Certifiers have to check the output. Users have to use external code essentially blind - esp in an example like OPs where the actual intent is not at all obvious from the method name, at least not to a person who isn't "on the inside" with OP's terminology, and I'm 100% sure that a more useful doc string could be thought of there. Running a tool to produce this useless documentation runs counter to the original intent of the certification too. If I were a certifier and saw that was what was going on, I'd fail the project /2c

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will

    The Lounge visual-studio

  • Need free VS tool which generates code documentation for me!
    D Davyd McColl

    From reading the question and replies to which the OP has also replied, I understand that the OP wants a tool to generate the xmldoc example given. And the only question I have is what value this "documentation" has? It tells you nothing you couldn't already glean from the signature. It's "documentation" like this which drives the "no comments" movement - because this is just more reading material for the consumer - it does absolutely nothing to explain the _why_ or the methodology of the decorated function. It will rot because it's been noise ever since it was introduced, so at some point, it won't tell you something obvious - it will just be a source of "WAT?!" for the reader. I'm incredibly dismayed at people looking for tools to do this and write their unit tests for them. Are we even craftspeople any more? Do you consider yourself a creator, or a button-pusher?

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge visual-studio

  • A gentle puzzle I was just asked.
    D Davyd McColl

    For sure: if I have -$2, I owe the bank more than if I had -$1. $2 is a larger number, indicating a larger debt.

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge question com lounge

  • GIT Time again - what am I missing?
    D Davyd McColl

    Subversion is not distributed. What this means practically is that there's no command like "git push", and this means that committing requites a working network connection to the source control server. You can't rewrite history, because every commit immediately goes to the server. You can't commit when not online, so you're forced to be on a reliable connection if you want to have small, clean commits. And if the upstream subversion server dies, the history is gone, where with git, every client that clones with the default options has a full copy of the history. There are other subtleties, but the above are a large part of why got was created for and adopted by Linux kernel maintainers by Linus himself.

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge collaboration announcement csharp visual-studio sysadmin

  • I Can Not Manage This Task
    D Davyd McColl

    threads and cores, gentlemen, threads and cores /penguin

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge testing beta-testing performance question lounge

  • Embedding scripting/python into an application - an successful examples?
    D Davyd McColl

    I hear you on the automation part. My experience has been that the host has full control over the sanbox in all 3 embedded languages we've used (py, js, c#). If we're concerned about embedding and security, the place for most scrutiny is the code users are putting in 😉

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge python database hardware tools question

  • Embedding scripting/python into an application - an successful examples?
    D Davyd McColl

    having used lua, I can concur that: 1. it's fast 2. it's small 3. it's powerful but I can also say that it's esoteric and likely "not like other programming languages your org is using", especially if you were considering python. it's built-for-purpose, and good at that purpose, but I hated writing code for the Lua runtime. Always felt kludgy, and I was never sure exactly what I was doing wrong when I was doing something wrong. Perhaps the latter would have faded with time, but with quite a few programming languages under my belt (C, C++, Tcl, Python, PHP, C#, F#, JS; plus the ones people will discount like SQL & sh, and even the ones I've used less like Ruby, Perl), Lua was (imo) unintuitive and painful to use. Could well be a personal problem as I know other people who love it - but if you get this kind of feedback from the people who would be writing code for the platform, I'm here to nod and agree.

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge python database hardware tools question

  • Embedding scripting/python into an application - an successful examples?
    D Davyd McColl

    We have had 3 live examples, in a dotnet world (so this may be a little specific to that platform) 1. Python rules to apply at runtime to products based on customer / date / whatever - finally removed because it was a bit of a mission to maintain, both because python considers whitespace to be important (and we're asking regular people to "get this right" in a web editor) and because we rather used: 2. Javascript via JINT ([GitHub - sebastienros/jint: Javascript Interpreter for .NET](https://github.com/sebastienros/jint)) - it's ecma5-capable, iirc, so don't expect all the latest-latest features, but it works, and JS is both easy to pick up and ubiquitous - a lot of people have some experience dabbling with JS and it's very easy to get simple things done without having to worry about formatting. 3. C#, via Roslyn, at runtime ([Compile code by using C# compiler - C# | Microsoft Learn](https://learn.microsoft.com/en-us/troubleshoot/developer/visualstudio/csharp/language-compilers/compile-code-using-compiler)) 2 and 3 are still going strong and are very likely to stay that way basically forever (:

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge python database hardware tools question

  • Nondestructive mutation: tell me about a time
    D Davyd McColl

    often, because a lot of common bugs can be traced back to unexpected mutations so if you send me an object and I don't know where it comes from, and I need a modified version of that to do something else, I'll make a copy first - I might use `.DeepClone()` from [NuGet Gallery | PeanutButter.Utils 3.0.167](https://www.nuget.org/packages/PeanutButter.Utils) followed by some (again, from that lib) `.With(...)` statements, eg ``` var foo = yourObject.DeepClone() .With(o => o.Name = o.Name.ToUpper()); ```

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge csharp com question

  • Buy or Build?
    D Davyd McColl

    I used to always build, but on my last machine, I decided to go with a good custom builder. I don't know what country you're in, so I'm not sure what would apply to you, but this is the route I'll probably go next time too (I went with, and would use again, WootWare - wootware.co.za) I won't buy some off-the-shelf junk - companies tend to stuff them with the lowest-spec'd rubbish they can get away with at a price-point, or put totally mediocre hardware in the box and charge $arm + $leg for it (GamersNexus videos cover _a lot_ of these charlatans!). I'd suggest finding a local company which builds based on "loose" specs and which has a good reputation for service, so if something goes wrong during shipping or something fails in the machine, they will help with RMA'ing things. For reference, I spec'd the following for my machine: - latest-gen i9 (11th at the time - 12th came out a month or 2 later... but I couldn't really wait) - 64Gb RAM - board supporting the above, with Wifi & Bluetooth support, either on the board or on a daughter board (ended up going that way) - Liquid cooling - Minimal lighting (but I ended up with more than I originally anticipated, and I kinda like it) - Chose a case that I like, looks-wise and rated online as tough and easy to work with (Phanteks Ethoo EVOLV) - Originally kept my GPU, but then bought a GPU from them - it's a minor installation - One NVME drive, if the overall cost fell within my budget (which it did) Whilst they did suggest an AMD machine for a slightly lower cost, they also didn't shove it down my throat, and respected me when I declined (a good friend of mine had been having an uncommon issue with his AMD that I was afraid I'd have, and I didn't feel like enduring the RMA cycle for a minor price difference - about 1.5% on the entire system) What I got - 11th gen i9 11900KF (can push the clocks - which I'm not - but no igpu - which I don't need) - 64Gb 3600mhx ram (2x32) - Gigabyte Z590 Aorus Elite - Fractal design cooler - The Phanteks case I wanted - Sabrent rocket nvme (which I wouldn't recommend, tbh - tends to overheat in a pcie-4 slot, though the Windows drivers just slow the drive down when it's heating up, so you won't notice in Windows - just the drive will get slow; but under Linux, the drive goes offline...) - later, a Gigabyte Aorus 3070 The experience was great - I had the fun of picking out what I wanted, with the safety of not having to double-check that I hadn't picked anything incompatible. I then got a beautiful, powerful

    The Lounge graphics hosting question career workspace

  • The Exception to the Exception
    D Davyd McColl

    No This is why we have DateTime.TryParse. Exceptions are expensive to throw and catch because they have to stop and construct a stack trace. You most definitely should _not_ just "catch the exception ... and then re-throw" if this is a common enough occurrence. On the other hand, if you don't know for sure that this is a possible outcome and the date-time parsing is not under your control, I totally understand catching & re-throwing with more context. But if _you're_ the one doing `DateTime.Parse` willy-nilly on a string, YATA.

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge database help sql-server sysadmin tutorial

  • code review
    D Davyd McColl

    You feel this way partly because a lot of people do code review wrong. Y'all need to check out Dr Michaela Greiler: 1. Follow [https://twitter.com/mgreiler\](https://twitter.com/mgreiler) if you use the bird site 2. Read her [code review checklist](https://www.michaelagreiler.com/code-review-checklist-2/) 3. Perhaps book a [code review workshop](https://www.awesomecodereviews.com/) if your team is really getting bumpy around code review time (I haven't worked through any of her workshops, but have a lot of faith they will be good based on her newsletter) Where I work, code review is an integral part of the dev cycle. No code gets back into the main line without review. When I joined the place I work at now, code review was new to me. Often it felt like brutal, unnecessary nitpicking. What's changed since then is two-fold: 1. all of us are striving to be better reviewers, because (a) that's good for the product, (b) that's good for the reviewee (fostering good relationships and the ability to learn), (c) that's good for the reviewer (not wasting time on pointless bull💩) 2. I think we've all learned to detach the _self_ from the _code_. You are, in the words of Tyler Durdin, not your fscking car keys. You are not your fscking code. You are fallable, like everyone else, and can, when open to it, learn, both to be a better coder, and to be humble, which makes you a better _person_. _Just because your code has an issue, it doesn't make you less of a person, or even less of a coder. It just grants you an opportunity to learn, when someone helps you discover that issue._ Of course, that "someone" has to learn how to review without personal attack - see recommendations above.

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge csharp com question code-review

  • NuGet vs Write Your Own
    D Davyd McColl

    A combination of both, including publishing my own libraries to nuget.org so I don't have to rewrite the same thing over and over, or, equally bad: copy-paste code between projects. The latter comes back to bite you when project diverge and you can't share fixes / enhancements any more (I've seen this on copy-pasted code at my work). My first nuget packages literally were so that I wouldn't have to write the same code twice - and that legacy continues. I don't think any of my packages have been used in only one place, and not having a central source of truth that can be fixed and easily propagated seems like a crazy idea to me. Libraries that I've made & found immensely useful across multiple apps include: - a duck-typer (duck-type objects or dictionaries to well-defined interfaces) - an ini file reader/writer - a management class for windows services (start/stop/restart/install/uninstall, etc) - container/manager for spinning up temporary databases for testing (mssql, mysql, sqlite, sqlce) & cleaning up once disposed - temporary http server, again for unit testing - spin up, add handlers, disposable pattern - an easy-to-use commandline arguments parser / mapper-to-an-object (because there was one that I liked, and the dev updated & broke things, and I thought "nuts, I can make that and have control over it" - miscellaneous utils like auto-deleting (via disposable pattern) temp files/folders, common reflection-based functionality, easy parallelisation, easy interaction with a sub-process (esp the I/O part), and some more For testing, I would imagine that you're either _not_ rolling your own unit test & assertion frameworks every time, or you're just not testing. I wanted smarter assertions that felt similar to JS-land ones, so I wrote NExpect. I'm happy to use nuget packages that are well-maintained & documented. I don't think anyone can do web work these days without nuget - I really don't think anyone is writing web servers from the ground up? Surely?

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge visual-studio csharp wpf docker security

  • Does Java have a future?
    D Davyd McColl

    yes

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge android learning java com linux

  • At the interview you find out you don't want to work there...
    D Davyd McColl

    yeah, I also have "been there, done that" - several times - and I can confidently say that whilst it's not an easy trick to pull off, steering a company's tech base from the shadows can be really rewarding (:

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge career question

  • At the interview you find out you don't want to work there...
    D Davyd McColl

    You missed a golden opportunity to be master of the domain. Workplaces like that are in need of someone to lead them out of the dark ages - and that someone inevitably gets paid more.

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge career question

  • Microelephant! Power settings rage
    D Davyd McColl

    I don't know if this will apply to you, but on my older Dell XPS, there were options in the BIOS which were very similar to some power settings - and took preference. I'd go spelunking through that - especially if a colleague's issue went away after an update.

    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

    The Lounge help announcement
  • Login

  • Don't have an account? Register

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