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
R

Rick Shaub

@Rick Shaub
About
Posts
130
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Survey: Do you develop Android apps?
    R Rick Shaub

    Like MRSA?

    The Lounge csharp android com tools question

  • maths question
    R Rick Shaub

    It seems to me that you need a test rig and calibration procedure if variation is the issue keeping you from knowing the position of the sensors. Just because the mechanical engineers can't guarantee the position, doesn't mean you can't measure it after manufacturing.

    The Lounge help graphics question css com

  • Visual Studio update woes
    R Rick Shaub

    You could use VS Code for editing while the update runs.

    The Lounge visual-studio csharp help question announcement

  • Freelancers: How do you cope with that?
    R Rick Shaub

    Member 10346655 wrote:

    Side-option here is to very quickly open-source that code, now the customer literally cannot own it, downside is, neither do you

    Open sourcing doesn't affect ownership. At least in the US, the copyright holder owns the code and distributes the code with a license. The license states what is required to use or extend the software. Most open source software uses one of a few well-known licenses such as the GPL, LGPL, MIT, BSD, or Apache.

    The Lounge com design sales help question

  • Freelancers: How do you cope with that?
    R Rick Shaub

    You could place a copyright notice in the header of any pre-existing code files that you plan to use, and provide a license file pertaining to that code. Perhaps you could persuade them to accept something licensed under The MIT License[^] Handling code snippets might be tricky, but if they are trivial, you could just rewrite them slightly for this customer. This Stack Exchange post may be helpful: copyright - How does fair use apply to code snippets? - Software Engineering Stack Exchange[^] Caveat: I am not a lawyer, but this is the type of approach I would use.

    The Lounge com design sales help question

  • Best gig ever?
    R Rick Shaub

    For me, it's a toss up between Metallica in Philadelphia in July 1989, and Type O Negative on Halloween at the Trocadero (RIP) in Philly. I can't remember if it was 1999 or 2000 when I saw Type O, but here's an article describing the 2000 show: TYPE O NEGATIVE CONTINUE HALLOWEEN TRADITION AT TROC – The Temple News[^]

    The Lounge adobe question

  • In defense of inkjet printers
    R Rick Shaub

    So an ink-JIT printer?

    The Lounge com business performance discussion

  • Being Fossil
    R Rick Shaub

    Do you ever get brand new projects? If so, look into using Electron, which is a desktop HTML/CSS/JS stack. Or better yet, use Python. Python is easy to learn and is a great general purpose cross-platform technology that be used to build just about any type of software.

    The Lounge javascript career asp-net csharp dotnet

  • This is hard: XKCD challenge
    R Rick Shaub

    The Dirt (38%). I loved it. I also loved Gummo (35%), but it was released in 1997. I was an adult at the time, though.

    The Lounge css com question discussion

  • i don't like object oriented programming
    R Rick Shaub

    Memoization might be useful for you. It's basically a way to cache function results with a given input in a dictionary and return the cached value instead of running the calculation again.

    The Lounge csharp c++ wpf oop

  • Modern C++ auto
    R Rick Shaub

    I don’t believe a useful language feature is “bad” if it doesn’t catch edge cases that are the result of not following SOLID principles.

    The Lounge c++ javascript question

  • Modern C++ auto
    R Rick Shaub

    I never said anything even close to that. I am saying if the maintainer of the GetSomething() function changes the return type without informing the consumer, that's a major problem that has nothing to do with language features.

    The Lounge c++ javascript question

  • Modern C++ auto
    R Rick Shaub

    That sounds like your API has issues. Functions are interface contracts and if you don't know that function's return type changed, then the interface has been broken. That's outside the scope of language keywords, in my opinion.

    The Lounge c++ javascript question

  • Modern C++ auto
    R Rick Shaub

    Can you give an example of such silent bugs? In fact, I think the ISO C++ committee would probably be interested in hearing about these bugs so they could address them in the next release.

    The Lounge c++ javascript question

  • Modern C++ auto
    R Rick Shaub

    Even "auto i=1" can be made explicit with "auto i=1U".

    The Lounge c++ javascript question

  • Is the new C++ as easy to use as Python?
    R Rick Shaub

    Dean Roddey wrote:

    Significant refactoring isn't common

    I think you forgot the "joke" icon on your post.

    The Lounge c++ python com question announcement

  • Is the new C++ as easy to use as Python?
    R Rick Shaub

    If that was the case I wouldn't use auto . The situation you described is actually a feature of the auto keyword. It's pretty useful to only change the initializer without have to change the type declaration during refactoring.

    The Lounge c++ python com question announcement

  • Is the new C++ as easy to use as Python?
    R Rick Shaub

    Auto deduces the type at compile time, so it's safe unless you intend the variable to be a base class of whatever the initializer returns.

    The Lounge c++ python com question announcement

  • Is the new C++ as easy to use as Python?
    R Rick Shaub

    Let's compare these two equivalent code snippets: C++:

    auto start = std::chrono::high_resolution_clock::now();

    doStuff();

    auto stop = std::chrono::high_resolution_clock::now();

    auto diff = stop - start;
    auto ms = std::chrono::duration_cast(diff);
    std::cout << "Elapsed ms: " << ms.count() << " ms\n";

    Python:

    start = time.perf_counter()

    do_stuff()

    stop = time.perf_counter()
    ms = (stop - start) * 1000.0
    print('Elapsed ms: ', ms, ' ms')

    In this case, the equivalent code is pretty similar, but modern C++ is generally more verbose out of the box.

    The Lounge c++ python com question announcement

  • Expert Beginner Dev's Know They Know Everything
    R Rick Shaub

    His blog is pretty awesome, too. www.daedtech.com

    The Lounge csharp question learning java html
  • Login

  • Don't have an account? Register

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