Comments

This profile is from a federated server and may be incomplete. Browse more on the original instance.

reverendsteveii, to programmer_humor in I'll just be a quick 3h

well, there’s confusion, paranoia, agitation and so many others…

reverendsteveii, to programmer_humor in I'll just be a quick 3h

our biggest client prefers data as Jason so we swapped half of our database to that

the app I work with currently stores json as the only column in a sql table and it hurts me so very much. like watching someone pick up a screwdriver and try to bash a nail in with the handle.

reverendsteveii, to programmer_humor in I'll just be a quick 3h

Enhance

reverendsteveii, to piracy in E-Books, best places to get them?

Piling on to this, part of what makes MAM great is that you get bonus points for seeding even if no one is downloading. Just keep your torrents running indefinitely and it won’t be long before you have free VIP forever, a 10:1 ration and still end up with more points than you could possibly give away

reverendsteveii, to programmer_humor in Bill is a pro grammer

manager in code review

theresYourProblem.jpg

reverendsteveii, (edited ) to programmer_humor in Bill is a pro grammer

`//Get CustomerInfo from CustomerRepository by Customer ID or else throw an CustomerNotFoundException

public CustomerInfo getById(String customerId) {


<span style="color:#323232;">return customerRepository.getById(customerId).orElseThrow(new CustomerNotFoundException());
</span>

}`

This is the kind of pointless comment I see in my codebase all the time. Best I can tell, a couple of my coworkers like to plan out their code using comments, then backfill in the actual executable code. That’s fine, but they leave the comments in when they add no value.

` public static LocalDate parseEndDateFromString(String dateString) {


<span style="color:#323232;">    try {
</span><span style="color:#323232;">
</span><span style="color:#323232;">        String[] split = dateString.split("-");
</span><span style="color:#323232;">
</span><span style="color:#323232;">        //In order to get the last day of the desired month, we go to the first day of the next month, account for rollover, then subtract one day
</span><span style="color:#323232;">
</span><span style="color:#323232;">        int month = Integer.parseInt(split[0]) == 12 ? 1 : Integer.parseInt(split[0]) + 1;
</span><span style="color:#323232;">
</span><span style="color:#323232;">        return LocalDate.of(Integer.parseInt(split[1]), month, 1).minusDays(1);
</span><span style="color:#323232;">
</span><span style="color:#323232;">    } catch (Exception e) {
</span><span style="color:#323232;">
</span><span style="color:#323232;">        throw new RuntimeException("Invalid date format - must be MM-YYYY");
</span><span style="color:#323232;">
</span><span style="color:#323232;">    }
</span><span style="color:#323232;">
</span><span style="color:#323232;">}`
</span>

Stuff like this, otoh, is where comments are useful. The required format is obvious from the error message, the param and return from the method signature, the only part that requires a comment is the fiddly logic of accounting for the edge case where month == 12 and the rationale behind how we determine the last day of the month. As a rule, comments are for why something is being done, if it’s not obvious, and for magic numbers. Code should tell you what code does.

edit: can anyone spot the bug that I introduced with that parseEndDateFromString() method?

reverendsteveii, (edited ) to piracy in Naming Torrents

You should tell that to OWASP then, they wrote it. org.owasp.esapi 2.5.2.0, class is Encoder, method is canonicalize(String, bool, bool)

reverendsteveii, to memes in F#€k $pez

anyone who wants to leave can go. Hell, I’m responsible for two of the lost users because when i first came over here I misunderstood how this works and made a new account on each instance. what’s up @reverendsteveii and @reverendsteveii?

reverendsteveii, to asklemmy in What game do you play to just chill?

burnout paradise. I’ll just put on a podcast and drive around. Sometimes I’m seeking out races, or new best times on roads. Sometimes I’m just driving around more or less obeying traffic laws like a reasonable citizen.

reverendsteveii, (edited ) to piracy in Naming Torrents

The issue is the filter that we’re using to avoid multiple encoding attacks de-escapes everything via multiple rounds, then tries to pass it to the next layer of filtering with the de-escaped request body as a json string. Your absolutely right that this is a silly way of doing it, but sometimes we have to live with decisions that were made before we were onboarded to a project. In this particular case, I pushed to improve the filters but all our PO heard was “spend development time weakening security” and at the end of the day they decide what to do and we do it.

reverendsteveii, to piracy in Naming Torrents

The only reasonable response to this behavior is disproportionate violence

reverendsteveii, to piracy in Naming Torrents

I work on a Web app and we recently decided that we’re just not gonna support double quotes in free text fields because oh holy balls what a thing it is to try to deal with those in a way that doesn’t open you up to multiple encoding vulnerabilities.

reverendsteveii, to memes in Amiright?

6 years into my career as a ReSTMonkey, this is absolutely still me

reverendsteveii, to memes in You can choose normal, fancy, or wildcard.

*scrimps

reverendsteveii, to privacy in Google memes itself with an admission of spying on customers via a new ad on reddit!

lemm.ee/comment/6088169

What’s wild is there seems to be a contingent on lemmy that goes into posts like this just to say “who cares that they harvest all your data?”

  • All
  • Subscribed
  • Moderated
  • Favorites
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #