« first day (1923 days earlier)      last day (1194 days later) » 

1:54 AM
You know what really annoys me? When automated "coverage" reports count comments against you. Coverage decreased because I added a comment? F you, CI!
 
2:07 AM
Can you not make a rule?
 
 
2 hours later…
3:38 AM
That requires more effort than writing comments to summarize 24 hours worth of coding that I eventually deleted to do the 5-minute fix but wanted to memorialize my efforts!
 
 
1 hour later…
4:44 AM
some declaration // see git hash 970fd for comments
 
5:24 AM
Don't hack around your tools. Fix your tools, or get better tools.
Comments should never affect coverage. Useful comments should be there in the code, where they can be seen and maintained, not hidden in the source control system.
 
5:47 AM
@CodyGray Yeah, I generally agree. And coverage in general is a mostly useless metric.
 
Possibly better than lines of code :-)
 
Maybe it's just swapping an old line for a new one with a changed variable name counted against me. I don't care.
I did stumble on an old set of comments of mine tonight that made me chuckle though.
if (!partitions.isEmpty()) {
    // If a partition exists on this drive, the major property
    // corresponds to the disk index, so use it.
    index = Integer.toString(partitions.get(0).getMajor());
} else if (getName().startsWith(PHYSICALDRIVE_PREFIX)) {
    // If no partition exists, Windows reliably uses a name to match the
    // disk index. That said, the skeptical person might wonder why a
    // disk has read/write statistics without a partition, and wonder
    // why this branch is even relevant as an option. The author of this
 
That happens to me, too. That's how you know you're doing it right.
Completely unsolicited code review: if it were me, I'd be retrieving and caching the result of getName(), rather than calling it all over the place.
 
Fair enough. If I ever rewrite that code I'll fix it. :)
Although it just calls
public String getName() {
return this.name;
}
so I could substitute this.name.
 
No, you can't, for the same reason that you shouldn't call getName() multiple times. You can't assume you know what the implementation of a method is and will continue to be in the future.
 
6:03 AM
I can when I'm the benevolent dictator! Muahahahaaha!
 
That's true, nothing's stopping you from shooting yourself in the foot. Other than future you.
 
6:37 AM
Low activity tonight... And last night, too. Makes me feel lazy.
 
Find a hobby? :p
 
I got in a lot of sleep the last 2 days.
 
@Nick I already did. That's what I'm talking about here.
 
I should've been clearer... Find a new hobby
New / another
 
Ah, yes.
That might present some other challenges, though.
 
6:45 AM
Oh?
 
I'm already procrastinating the real work I need to be doing when I am here. So if I find something new to do, then that'll be more excuse to procrastinate the real work that I need to be doing. Plus, what about tomorrow, when all the spammers and trolls come back here, and I need to deal with them? Then, the new hobby would be an inconvenience.
I'm thinking to just have some wine and go to bed early. :-)
 
Ah, so it's not just me for which motivation is at an all time low
 
Oh, goodness, no.
I've been trying to come up with creative ways to motivate myself. Haven't succeeded yet.
I'm not normally someone who struggles with a lack of motivation, but these past several months have been very hard.
 
Yeah, same here, I've mostly been talking to people to stay sane, well, maybe not people, but a person ^^"
 
That can be dangerous. What if you choose a person or people who are not, themselves, sane?
 
6:49 AM
I know they're not sane
If they were it would be dull
 
So it's just a way to entertain yourself? Couldn't you have accomplished the same thing by watching political news coming out of the US for the past several months?
That wouldn't even involve talking to anyone.
 
Ehhh, to entertain myself makes it seem like I'm using them for that purpose, we keep each other happy
And while American politics can be amusing, it can be just as equally depressing
 
So can talking to other people
 
Yes, that's why i keep the number of people I talk to very low, and the people themselves a certain type
Limiting my exposure to crap I can't be bothered dealing with keeps life easy
 
That sounds marvelous.
 
6:56 AM
It is, if only I could do it at work
Too many outspoken people around me with opinions other than my own
On stack as well I guess
 
Work is my biggest source of frustration. I don't have a "delete" button there.
Friday, in a meeting, I got told that I need to write code for two major software systems. At the same time. Do them "in parallel", I was told.
I tried complaining that I can only do one thing at a time, but I was told "that's ridiculous" and that I need to do them both at the same time, in parallel.
 
I have a manager who insists on code (generally smaller tools) being written using only 15hrs or so worth of time. Generally that would be about right.. Until they also ask for a detailed design spec and test spec to go through our documentation process (including review and approval processes), plus formal testing with a witness... All within the same 15hrs
Needless to say I get the tool written, they ask for it and when they say "has it been tested" the response is always:"informally" (i.e. I've done to the best of my ability with the time I had the testing needed to make sure it does what it's meant to, nothing more)
 
I'm trying to imagine the kind of tool that could be designed, developed, and even informally tested within 15 hours.
 
7:12 AM
Design? Ha, I've not had the luxury of designing anything in a long time
The design gets written after development and is just there to give the client a document to say "look, documents"
 
Someone has to design it.
I don't just mean documentation. I don't write design documentation, either, because I don't have the time. But I still have to design the thing.
I have to decide how it should be implemented, how it should work, what inputs and outputs, how it interfaces with higher-level (and possibly lower-level) systems...
 
I design it as I go, "software as design" or whatever its called
Generally I know the exact input and exact outputs I need, and have some idea of how it's meant to work on the inside before the 5 minute conversation of what it has to do is even finished
(I guess the advantage of working on small tools)
 
See also: script kiddie :-p
 
Pretty much
I want to spend more time thinking about it, but again, luxury
Half the stuff I've developed im not even slightly happy with
Sure they work... But that alone isn't satisfying
 
I mostly kill myself to develop things I'm proud of, under impossible circumstances where no one else cares about anything like quality.
 
7:20 AM
I'm beginning to learn to do that, the last bit of JS I wrote for work was something I was proud to check in to source control
 
And then you realized it was JS?
 
The vendor who develops the application the script was for did have a plan to move over to TS but.... Got pushed back by at least 2 years
2 years ago
 
Is C++ just a hobby then, or do you actually use it at work?
You just develop in a variety of different languages?
 
I have never written C++ at work in the 5 years I've been at the company, except to keep myself thinking in a bit of downtime
The closest I've come to C++ was explaining some C code that was twice my age to a colleague (who really should've known C), and that's not exactly close
As for writing in it at home... I like knowing things, and C++ has always interested me, my experience with it is just limited
 
Ah, so... same as Zoe. :-) I guess I assumed you were doing C++ professionally. Not sure why.
 
7:32 AM
Nah, most of the stuff I write professionally is C#
And yes, Zoe's helped a bunch with the C++, with me occasionally being able to help her
 
I got the impression that she was the one learning, and you were the one who was mostly helping her.
I haven't touched C# in years. I don't even know that I'd be able to fake it anymore...they've introduced so many new features into the language since I last used it.
 
The issue with most languages for me at this point is I know the basics of what they provide, and enough to do anything that i would need to do, but the useful stuff which is less immediately obvious (stuff like the contents of <algorithm>) is not so deeply engrained
 
It doesn't have to be. Only chumps memorize all of that. You just go looking for what you need, when you need it.
 
Last I helped Zoe was with this long long sum = std::accumulate(vec.begin(), vec.end(), 0, std::plus<long long>());
As in, to fix the bug in it
 
Right. Because it should be auto sum = std::accumulate(std::begin(vec), std::end(vec), decltype(vec)::value_type())
(std::plus is implied)
Honestly, I'd probably use a range-based for loop. I guess I'm old-school; I still find those far more readable than std::accumulate or std::transform.
 
7:48 AM
I just recommended to use 0ll instead for the accumulator /shrug
 
Meh.
Generics with hard-coded types == meh.
And YUCK! If you're going to use the L suffix, always make it capital! Otherwise, it looks like a 1.
 
And in the same situation (advent of code 2020 day 9), I had used a range based for, because I also needed the min and max
 
@CodyGray Why is that do you think? Is it because of the begin and end?, or the decltype? Or something else?
 
(I actually suggested (long long)0 because I didn't know there was a suffix for long long literals :p)
And I would use LL in practice, but phone typing hard
 
@cigien I use begin, end, and next all the time, so that's definitely not it. And same for decltype.
It's the fact that I find actually showing the loop to be much more obvious than having the loop and its corresponding operations hidden away in a function.
@Nick Aaarrgghh!! std::minmax_element!
 
7:52 AM
I also still haven't seen any compelling arguments for/against std::begin/end over .begin()/.end()
 
@Nick std::begin() works for more things than .begin().
 
Canonicals are 1 and 2. Basically, std::begin works generically for everything, including C-style arrays, where the member function doesn't. Since you want to avoid .begin() in templates/generic code, I just avoid it everywhere.
There's no performance cost, since the compiler is going to inline it. It's easier for me to remember a single syntax, and it's easier to understand code when it has predictable patterns.
 
@CodyGray This is very interesting. I have the opposite feeling. So long as something can be clearly named, I'd rather not see how it works. Why do I care to know that there's a loop that adds stuff needed to calculate the sum of a bunch of numbers? An analogy would be exponentiation. I don't necessarily want to know that it involves repeated multiplication, if I just want to exponentiate something.
 
The other advantage of getting into the habit of using std::begin and std::end is that you can easily enable ADL by adding using std::begin; and using std::end;
@cigien I would agree that's true for very simple cases where it can be easily named, like std::accumulate. That doesn't apply with most use-cases for std::transform, though.
 
I DM'd you the code in question, but then figured it makes more sense to put it here, turns out I didn't need min/max of whole vec, just of how far I'd got so far: here - Can't exactly remember what it was meant to do, the full question description is in the same folder as the cpp though
 
7:58 AM
I'm on the fence about std::accumulate. Objectively speaking, I'd say it's equally as clear as writing the loop. It's only about familiarity and inertia when it comes to my writing the loop.
But when I see code using std::transform, I genuinely have a more difficult time figuring out what it's doing versus just seeing the loop.
@Nick I certainly have no idea, since you used function names like B :-)
 
It's day 9 part B, what do you expect me to call it :p
 
Meh.
ILikeLongDescriptiveNamesThatClearlyStateWhatSomethingDoesOrMeans
 
Yeah, so do I, means I need fewer comments
But I also know when something I'm writing isn't going to get looked at again, even for maintenance
 
I also like comments.
Also true. Which is why I also don't like coding challenges.
 
I say that I know it isn't going to get looked at again, despite the fact I just looked at it again
I don't particularly like them, which is why I only ever get halfway through one, once a year
 
8:06 AM
You do all the part B's? ;-)
 
Don't even get to read the Bs before doing the As
Comments are fine, but the should generally be supplementary for stuff that's not immediately clear. Too many times have I seen comments that say // display variable, directly above var display;
 
Yes, that's a dumb comment, because a variable declaration doesn't display anything at all.
 
Lmao
I shouldn't have chuckled at that but I did
 
It should say something like // Using unsafe var declaration instead of let for back-compat
 
That was a C# comment ;)
 
8:11 AM
Oh, right.
// Using var declaration because this ain't JavaScript, yo
 
Exactly
Generally I do use var in JS though, even though let is supported in IE11 (which we have to support)
 
The whole idea of declaring variables in JS scares me, because it's so horribly broken.
 
Can I assume you're not a fan of python either? :p
 
Ugh.
Everything I learn about Python makes me dislike it.
But at least I haven't heard that variable scoping is broken beyond repair in Python.
Maybe it is. Wouldn't be surprised.
 
When I was first taught programming... A mere 13 years ago... We were taught using VB5
 
8:18 AM
Classic VB is a great language.
I mean, it has its flaws, but they're minor and can be easily worked around.
 
Does VB (not VB.NET) have VLAs? Or is it only through ReDim?
 
The discontinuation of classic VB was a huge loss. There's still nothing available that holds a candle to it.
Yeah, Redim Preserve
I've never needed to do that.
 
I still occasionally have to use VB (cause VBA is still some form of VB6 IIRC), haven't used VB.NET
 
Yeah, VBA is similar but not the same as classic VB.
It's inferior in almost every way that matters, except for one: the integration with Office :-)
 
My biggest issue with VBA is how aggressive the editor is with telling you there's an error
(syntax error to be clear, not runtime)
 
8:26 AM
How is that not awesome?
Oh... I think there's an option (at least there is in VB6) that you can turn off so it doesn't tell you about errors while you're still editing that line.
Otherwise, it's awesome.
 
Because I don't need a message box appearing every 3 seconds when I know there's an error and I'm just ignoring it while I do something else
@CodyGray ill have to hunt for that
 
The first thing I do in almost every program is open up the Options/Preferences dialog and see what needs to be set :-)
Tools -> Options -> Auto Syntax Check in VBA
 
I don't get everyone's problem with VB, it's easy to read and actively tries to make your life easy
 
The modal dialog is, of course, the issue. Not the fact that it annotates errors.
Yup.
The principal defect is the lack of an effective error-handling strategy.
 
OnError Go To label IIRC is all I've used (or continue rather than goto)
Been a while like I said, can't even remember if goto is one word
Fortunately the editor would fix it for me ^^
Or was it Pass instead of continue? Honestly can't remember
Maybe skip...
 
8:37 AM
@Nick That's basically all there is, which is the problem. (Yes, it's one word.)
Actually On Error GoTo Continue is better, then you just handle the errors in-line.
I'm not sure if VBA supports that variant, though.
 
I touch it maybe once a year when someone needs a spreadsheet doing something funky with network files, probably do it a little slower than if I touched it more often, but always happy coming out of a bit of VBA work
Something strangely satisfying about it
 
 
6 hours later…
2:54 PM
@CodyGray Can I ask you something? Is it allowed to link this chat room to a user's closed post if the user asks why their post got closed? Thanks in advance!
 
@AnnZen that is not what this room is for. Explain in comments or invite them to a chat elsewhere
 
in SO Close Vote Reviewers, Dec 22 '20 at 19:36, by Adrian Mole
@AnnZen Don't mean to be anything other than FYI but, if you ever have issues that are deemed "off topic" in here, then many of us hang around in the Ministry of Silly Hats. We can discuss (almost) anything, subject to global SE rules, of course.
 
Yes, because this room has sort of become the low-key trash room of SOCVR. You're asking about pulling in a random user from the main site with no chat precursor.
 
Okay, sorry.
 
 
2 hours later…
4:48 PM
Seems like I'm a much misunderstood mole. Maybe the Mole should go Mute?
 
 
2 hours later…
6:42 PM
@AdrianMole moles are often misunderstood creatures
 
@RyanM Congrats on 10K! Is the site all pink now? :)
 
 
5 hours later…
11:25 PM
@AnnZen I expect you didn't mean this chat room.
@RyanM Do you remember what you did when creating your gravatar account? Did you link any sites to it? Like you, I'm not seeing any gravatar option
Unless it's been completely deprecated :( How do I enable Gravatar instead of Identicon?
 
11:42 PM
@Scratte I realized :)
 
I changed my email on stack to try the gravatar thing out. Strangely even though it says it will affect the other communities, it seems that there either a delay.. or it doesn't.
 

« first day (1923 days earlier)      last day (1194 days later) »