18

In my wallowing experience as a freelancer I've noticed that almost all C/C++ clients are perfectionist. You just can't please them by getting the job done quickly.

I got a libcurl job from one the other day to scrape data from a target website and within an hour it was ready. I notified the client and he was both amazed and confused assuming it would take the whole week.
C++Client: The code works but you need to take your time.
Me: Sorry?
C++Client: Yes, it works but you used "string" instead of "wstring"
Me: 😊 Oh okay... *converts strings to wstring*
C++Client: And also variable names should be more descriptive.
Me: 😏 *int foobar => int very_long_descriptive_foobar_01*
C++Client: And also use "shorts" for page nums it'll save some bytes
Me: 😕 *int => short...*
C++Client: And also use forloops instead of whileloops
Me: ☚ī¸ *whileloops => forloops*
C++Client: And also use -- instead of ++ in loops
Me: 😤 *for(... i++) => for(... i--)*
C++Client: And also...
C++Client: And also...
C++Client: And also...
C++Client: And also...
C++Client: And also...
C++Client: And also...
C++Client: And also...
===> Seven "and also" days later <===
Me: *completed 10 Java projects behind the scene*
C++Client: And also use pthread instead of thread
Me: 😧 It's day 7 already!
C++Client: Oh I see, great job. You can compile and send me the archived source.
Me: 🤩
C++Client: And also...
Me: 🏃💨

Comments
  • 7
    For the kinds of things C/C++ is usually used for, getting the job done quickly isn't usually a good thing. If it was something easy you'd be better off using an easier language.
  • 4
    What a bunch of weird and totally unnecessary optimizations...
  • 7
    I agree with the variable names.
    The rest are as @iiii indicated: weird and unnecessary.

    Also, I agree with @RememberMe.
  • 2
    If the client knows this much, they should have written their own program. LOL.
  • 1
    Was it a fixed price gig, or did you charge by the hour?
  • 2
    -- instead of ++?
    I think I've heard this one before, isn't that the assembly trick where you start your loop high and end on 0 so you'd have one instruction less?
  • 0
    @platypus Yeah it was fixed and he paid all even before we started.
  • 1
    @Jedidja You're right about the -- trick but that to me feels like an unnecessary way to optimise on such a project, maybe on a loop over millions of record we'd see visible difference, dunno.
  • 1
    just curios, Doesn't -- instead of ++ prevent infinite loops in edge cases.
  • 2
    That’s the problem with fixed price gigs. They’ll nickel and dime you to death with all sorts of tweaks.
  • 0
    @hyper-dave I think both -- and ++ can lead to an infinite loop if used incorrectly. Like re-initializing the index variable inside the loop with a constant.
Add Comment