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
S

ShawnVN

@ShawnVN
About
Posts
22
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Are there good techniques when manually merging code ?
    S ShawnVN

    One advanced technique -- maybe overkill for your scenario but sometimes necessary.. I had to do this recently -- use a tool like Araxis Merge to do a three-way diff/merge (compare 2 branches against a common ancestor). 1- use `git merge-base BranchA BranchB` to find common ancestor .. create a new branch BranchC off that commit 2- clone/checkout BranchA and BranchB in separate subdirectories 3- launch a three-way merge: A(left), C(center), B(right) .. manually merge stuff to BranchC 4- commit BranchC .. then merge those changes back up to BranchA and BranchB this will lose some commit-history from incremental changes in BranchA and BranchB.. vs cherry-picking from A to B then merging back to A but if those branches were messy and conflicting, then that commit-history might have been unintelligible anyway

    The Lounge database devops question

  • Are there good techniques when manually merging code ?
    S ShawnVN

    Can latest BC do a three-way diff/merge? (ie. diff 2 branches against a common ancestor) I think that's why I've stuck with Araxis Merge .. but may give latest BC a try again. Araxis costs $

    The Lounge database devops question

  • I hate something I know nothing about...
    S ShawnVN

    I agree with and love your high-level point .. but on the specific example of JavaScript, you're wrong -- it's terrible. :]

    The Lounge javascript learning csharp css visual-studio

  • .NET's Sometimes Nonsensical Logic
    S ShawnVN

    I know I may be alone on this but .. I just do not like Linq. It biases for easy-to-write at the expense of easy-to-understand (to say nothing of perf implications of making non-inlineable callbacks for each item in the list). Semantic details (like your example) matter, and I've spent way more hours debugging unexpected nuances like this, than I've saved by not writing a foreach loop in a little helper method.

    The Lounge csharp visual-studio question

  • MFC? WinForms? I gotta ask... why?
    S ShawnVN

    In terms of article content on the site, I see 26 articles tagged WPF in past 12 months .. but only 5 tagged WinForms and 12 tagged MFC. But ok yes that is still a lot more MFC content than I expected, in the year 2023.

    The Lounge csharp c++ question asp-net

  • Seeking Way Back Defrag Name Assistance
    S ShawnVN

    Me: "who would write GUI code in assembler? that's not 10x that's insane" Also me: probably guilty of writing a few lines of inline-asm, in the distant past, to thunk from a static callback function pointer to an instance-method Also also me: (closes this web page and resumes reading tutorial on WebAsm)

    The Lounge tools

  • A gentle puzzle I was just asked.
    S ShawnVN

    Kinda depends on who's asking.. a C programmer, or Python, or Javascript or a maths professor. (idk the answers but can we craft this into the form of a "these three guys walk into a bar" joke?)

    The Lounge question com lounge

  • Quick Tip: Windows Explorer, best shortcut ever!!!
    S ShawnVN

    Good to know, thanks.. It's interesting.. does explorer.exe really use a network share as the current-working-directory? That seems.. scary, to me. Maybe explains why my work laptop hangs, all the dang time.

    The Weird and The Wonderful css com sysadmin data-structures question

  • Quick Tip: Windows Explorer, best shortcut ever!!!
    S ShawnVN

    Start / Run / "." [win+R] [Period] [Enter]

    The Weird and The Wonderful css com sysadmin data-structures question

  • Deleting Windows folders...
    S ShawnVN

    2021 .. I credit pandemic-boredom. :)

    The Lounge question

  • Deleting Windows folders...
    S ShawnVN

    yeah there's a lot of advice out there "just run takeown.exe and icacls.exe" but at some point, Windows.old directory structures started containing pathnames > 260 chars, and directory symlinks that loop back on themselves.. it's maddening! further maddening, the .NET interop to call Advapi32 to enable necessary admin permissions, was extremely non-intuitive.. lots of old, bad code out there that works on x86 but not on x64 due to differences in struct-packing (member alignment) lmk if it helps or fails in any way.. haven't tested it on Win11, yet

    The Lounge question

  • Deleting Windows folders...
    S ShawnVN

    I too got tired of this problem and wrote a little cmd line tool for this.. GitHub - windojitsu/OwnAndResetAcl: Reclaim ownership and control of a directory tree.[^] OwnAndResetAcl A sanity-saving tool for dealing with those pesky "Windows.old" directories Reclaim ownership and control of a directory tree. Recursively takes ownership and resets the ACLs of files, directories and symbolic links. Does NOT follow reparse-points (symlinks or junctions). DOES reclaim ownership and restore access to symlinks and junctions. DOES support traversing/accessing long pathnames. DOES include hidden/system files and directories, and empty directories. DOES NOT modify timestamp or attributes of any files/directories. USE WITH EXTREME CAUTION: Everything in and under the target directory will be owned by the 'Builtin\Administrators' group, and have a DACL which explicitly grants Everyone full-control.

    The Lounge question

  • Why are code signing certificates so expensive?
    S ShawnVN

    It's the work they do to verify your (enterprise) identity. That's what is meant by EV ("Enterprise Validation") certs. As opposed to DV ("Domain Validation") certs, which are freely available and commonly used for SSL/TLS on the web. I really wish Windows would support DV certs, for code-signing. I get that it's not as strong, but it seems like 90% of games apps and tools out there don't have any signing at all.. surely DV signing would be better than nothing. :/

    The Lounge css visual-studio hardware cryptography question

  • Why do so many "developers" not understand 'null'?
    S ShawnVN

    No. Where are you finding these people? It seems hard to get far in life without knowing what null is. KNIGHT: The Knights Who Say Null demand a sacrifice! ARTHUR: O, Knights Who Say Null, we are but simple travelers who seek an enchanter who lives beyond these woods. KNIGHT: NULL! NULL! NULL! ARTHUR and PARTY: Ooh, ow! KNIGHT: We shall say NULL again to you, if you do not appease us. ARTHUR: Well, what is it you want? KNIGHT: We want... a :shipit: on this code-review.

    The Lounge help sharepoint collaboration beta-testing tutorial

  • Microelephant! Power settings rage
    S ShawnVN

    Is it a corp-controlled laptop image, or a device you own? Laptop OEMs always seem to author so much garbage "value-add" configuration software, that interferes or conflicts with basic OS functionality. Who knows what it could be doing. The first thing I do with any new laptop is reformat and reinstall OS, and drivers. If I can.

    The Lounge help announcement

  • I hate recent C# versions!
    S ShawnVN

    I'm ok with some of the simple quality-of-life things like null coalescing, and switch expressions. But a lot of it (compiler and runtime lib) has all gone a bit too far in the direction of high-level / functional programming. The beauty of C# was that it had much of the speed and efficiency of a low-level lang, with high-level niceties like GC, immutable strings and bounds-checked arrays (all of which happen to be important for security). But now code is riddled with anonymous function callbacks and linq expressions which can be 30x slower and consume more heap, than equivalent old school C#. And harder to read, sometimes, yes. I think it's a generational rotation, from devs whose first language was C/C++, to devs whose first programming language was javascript.

    The Lounge csharp question

  • Dear Programmers, Why do you hate me?
    S ShawnVN

    my mini-spec: Base32 Encoding for IDs essentially just [A-Z 0-9] but without '1', 'I', '0', or 'O'. so, ([A-H]|[J-N]|[P-Z]|[2-9]) case sensitivity: no a uint64 can be represented in 13 chars .. a 128-bit GUID in 26 chars everyone please ratify and adopt my proposal as a worldwide standard, asap kthx

    The Lounge help question

  • PathYetAnotherMakeUniqueName
    S ShawnVN

    History: This was part of a batch of embarrassing internal junk, that lawyers forced to document as part of the DoJ consent decree in 2001. Basically, various API surface in Windows (mostly helper functions in Shell32.dll) that other products (mostly Office) were calling. It was never intended to see light of day.. obviously, it was the result of some dev who rotated from one org to another, and copy-pasted some helper function code from one product repo to another. I don't recall any of those lawyer-documented functions doing anything meaningful (that couldn't be replicated in user-mode code using existing Win32 APIs). But, try explaining that to DoJ lawyers..

    The Weird and The Wonderful question com adobe json architecture

  • Comparison of 2 Web Hosts
    S ShawnVN

    1. There are a few page-speed-test tools out there, that will hit your page from dozens of locations on planet earth.. measuring ttfb and full load time, etc. https://www.dotcom-tools.com/website-speed-test[^] 2. Things like HTTPS and HTTP/2 matter, hugely. 3. If you care about speed, reliability and security (incl. ddos-protection) you should really serve everything from a CDN edge-cache like Cloudflare or AWS CloudFront. Even if your content isn't cacheable.. just using a CF endpoint as a "proxy" will have huge benefits for short-circuiting roundtrips from browser-to-server. (Just establishing a single HTTPS connection requires several sequential TCP roundtrips.)

    The Lounge csharp asp-net com data-structures sales

  • hosting a site, any recommends, or outfits to avoid?
    S ShawnVN

    > I don't know what egress bandwidth is. It's about US$0.10 per gigabyte, most cloud providers. :P (Varies based on datacenter region.) I haven't tried OVH but iirc their model is based more on throttling internet gateway traffic (100 mbps or 250 mbps for their smallest virts) instead of charging for it. It's a nice option, if that fits with your intended use.

    The Lounge docker hosting devops question
  • Login

  • Don't have an account? Register

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