I haven't worked with C++ for years, and it's nice to see there really has been some progress improving some of the C++ parts.
I haven't worked with C++ for years, and it's nice to see there really has been some progress improving some of the C++ parts.
First, rudimentary/basic enums are as simple as instance variables on a class and allow super-helpful IDE "auto-completion" that doesn't necessitate the use of magic-strings to at least "set" the enum. I've been using this ridiculously simple trick since 2.5 ten years ago. Magic-strings are bad, and even worse when you have a disparate code-base in a dynamically typed language. Example:
class MyEnum(object):
Pass = 1
Fail = 2
my_value = MyEnum. <-- at this point, the IDE gives you code-completion.
Second, real Enums added as a language-feature along with type-hinting are almost 100% on-par with statically typed languages. See: class MyEnum(Enum):
Pass = 1
Fail = 2
def my_func(did_they_pass: MyEnum):
if did_they_pass.Something: # IDE / type-checker will go nuts here.
print("Something")
Edit: Forgot the main point. Switch/case uses are only a small sub-set of the uses of Enums. So even basic/crappy enums are better than magic strings in a dynamically-typed language. Also, please don't use "list of strings" for enums in Python, there are much better ways to do that sort of thing that preclude unnecessary bugs popping up.I really like Lamy 2000, though.
It's one thing to just say "here's the ideal". And another to say if you're in a sub-optimal place, "just leave."
But how to change a poor habit place into a good habit place.
I don't think bad habits really go away, they get drowned out by the better habits. I think the same is true of teams. But, IMHE, improvement has been hard to come by.
I'd love to hear your stories.
Being able to have a customer accept what the output looks like and then listening to when the page changes would be great for giving non-technical people control over passing tests.
That said, as a long-term evernote user, I've been wanting to leave for a while and move to an OSS/self-hosted solution. It might be joplin but my few attempts to use it I haven't yet had enough time to evaluate whether it would be a viable long-term solution.
Edit: I'm also seriously considering just using https://github.com/Alok/notational-fzf-vim and only doing note-taking on my laptop (not on mobile). It's extremely fast and basically zero friction. This would have a slight downside in that I quite often want to consume notes on the go so I may need to find an option there (eg serve my notes up using a private server or something).
It's a surcharge to avoid political ads, but hey Mr. Bloomberg, if you need to get attention... we will collect your money.
What would they do with this extra money? Fund open source foundations?
...wait... is $10Million too low? Is there that much money in politics?
Ask them to tell a joke. Do they do it right?
(edit like a timelord!)