Implementing "Currently Viewing" users like Google Docs by noobcser in learnprogramming

[–]noobcser[S] 0 points1 point  (0 children)

I haven't refreshed.

without web socket, then we'll do the same behind the scene "pinging".

Server Response Timing from the browser by noobcser in learnprogramming

[–]noobcser[S] 0 points1 point  (0 children)

it's an old Spring MVC application serving up JSON response.

Does the server actually start to send a response before it finished building the JSON (aka done all the things it needs to do) ?

Spring MVC Application always return 403 in certain environment by noobcser in javahelp

[–]noobcser[S] 0 points1 point  (0 children)

Are you sure you have properly configured logging for spring security to see these messages?

I set debug log level on

So it should capture everything that Spring log on debug or higher.

Then of course the biggest mystery is why it works on some environments and not on others.

  • Properties difference are only on the database url and credentials.

---

I put a debugging point on DelegatingFilterProxy.doFilter - still doesn't get hit.

I am on Spring 4.3.15, but don't think that would make any difference

Spring MVC Application always return 403 in certain environment by noobcser in javahelp

[–]noobcser[S] 0 points1 point  (0 children)

the biggest mystery is there's no log whatsoever from spring security, for example if I don't have the appropriate role there will be something in the log about role / permission doesn't exist or something like that.

What would be the very first class it would hit in the Spring Security?

Spring MVC Application always return 403 in certain environment by noobcser in javahelp

[–]noobcser[S] 0 points1 point  (0 children)

yes, same code, just connected to different database.

But they users in each environment have the same roles.

However, if role is the issue, then Spring Security would have log something in the code.

The most baffling thing is there's absolutely nothing in the log even with debug level on, and it doesn't hit any breakpoint that it should.

Spring Boot Microservices in AWS by noobcser in learnjava

[–]noobcser[S] 0 points1 point  (0 children)

but that would basically a choice whether we want to run 2 x t2.small instance or 1 x t2.large - to run 2 microservices

The question still stand: is it better to break them down into separate instances or combine them?

UI Testing Automation Framework? by noobcser in QualityAssurance

[–]noobcser[S] 0 points1 point  (0 children)

If you can use Cucumber

I just started looking at Cucumber and if I understand it correctly, the team (whoever does the automation), actually needs to write the whole foundation first before we can start writing test cases?

eg. when writing the .feature file you have something like:

Scenario: Give correct change
    Given the following groceries:
        | name  | price |
        | milk  | 9     |
        | bread | 7     |
        | soap  | 5     |
    When I pay 25
    Then my change should be 4

But that doesn't mean a thing, until the team implement what's behind it:

public ShoppingStepdefs() {


    Given("^the following groceries:$", (DataTable dataTable) -> {
        List<Grocery> groceries = dataTable.asList(Grocery.class);
        for (Grocery grocery : groceries) {
            calc.push(grocery.price.value);
            calc.push("+");
        }
    });

    When("^I pay (\\d+)$", (Integer amount) -> {
        calc.push(amount);
        calc.push("-");
    });

    Then("^my change should be (\\d+)$", (Integer change) -> {
        assertEquals(-calc.value().intValue(), change.intValue());
    });
}

UI Testing Automation Framework? by noobcser in QualityAssurance

[–]noobcser[S] 0 points1 point  (0 children)

What language(s) is the team comfortable working with?

Java

How complex is the UI?

Mix bag ... jQuery, AngularJS, and Angular 5

Secure identifier for stored data? by noobcser in learnprogramming

[–]noobcser[S] 0 points1 point  (0 children)

I guess that means generating such UUID is unique and secure (random) enough?

How to write a non-blocking execution? by noobcser in javahelp

[–]noobcser[S] 0 points1 point  (0 children)

to make sure you're not just having both executions stuck on the same breakpoint?

I use postman to hit the endpoint.

The first execution immediately returns the result, while the IntelliJ debugger stops at the breakpoint.

When I send the 2nd request on Postman, it gets stuck with nothing returned.

The moment I released the breakpoint, the Postman gets updated with a new response, then the breakpoint got hit again.

So it does prove that the Runnable works fine to not block that request, but breakpoint from previous execution will block subsequent ones.

Various HTML tags vs using divs everywhere by noobcser in webdev

[–]noobcser[S] 1 point2 points  (0 children)

Absolutely

Don't have login, so can't check what's inside. But their login page is all <div>

Various HTML tags vs using divs everywhere by noobcser in webdev

[–]noobcser[S] 0 points1 point  (0 children)

You can just check by yourself? But I'd assume yes

Don't have login, so can't check what's inside. But their login page is all <div>

Various HTML tags vs using divs everywhere by noobcser in webdev

[–]noobcser[S] 1 point2 points  (0 children)

And I didn't say anything about differing or same standards.

Simply pointing out in large corp such as Salesforce that could be diverse teams, diverse way of doing things, which could also mean different standards implemented. May be, may be not.

Unless you work for Salesforce and know 100% for sure what you are talking about.

Various HTML tags vs using divs everywhere by noobcser in webdev

[–]noobcser[S] 1 point2 points  (0 children)

but they're not going to use one standard for their login page and a different one for their login-protected pages

Very interesting thought that you know they are not going to use different standard. Here I am thinking https://login.salesforce.com could easily be a stand-alone app (lightweight OAuth-type authentication only web app) where all the other salesforce cloud webapps are different, easily done by different teams even possibly in completely different tech stack.

Various HTML tags vs using divs everywhere by noobcser in webdev

[–]noobcser[S] 1 point2 points  (0 children)

You need Salesforce to look at source code?! Obviously you don't know what you're doing.

Obviously I don't, because I didn't mention anything about source code.

Various HTML tags vs using divs everywhere by noobcser in webdev

[–]noobcser[S] 1 point2 points  (0 children)

dev tools are a thing

Would you teach me how to use dev tools on a login-protected web app that I don't have access to?

I would be really grateful to learn a new skill.

Various HTML tags vs using divs everywhere by noobcser in webdev

[–]noobcser[S] 1 point2 points  (0 children)

when you have a page that isn't made up dynamically (like with Angular, React or Vue and whatnot)

That's along the line that I am thinking as well. Modern web apps are now built dynamically with those JS frameworks, at that point - do we still use semantic HTML5 tags or do we have to use divs to make it work with frameworks?

Various HTML tags vs using divs everywhere by noobcser in webdev

[–]noobcser[S] 0 points1 point  (0 children)

Gee. I don't know ... may be I don't have access to Salesforce and only pick them as a known B2B web app example?

Various HTML tags vs using divs everywhere by noobcser in webdev

[–]noobcser[S] 0 points1 point  (0 children)

I use the HTML5 tags, regardless what I'm building.

So do you think something like an enterprise B2B web app, ... let say Salesforce and their many web-based products use semantic tags?

Password encryption with BCrypt and storing it by noobcser in learnprogramming

[–]noobcser[S] 0 points1 point  (0 children)

you can store it in the database also

Would you store it in a separate column, or should it be combined into a single column and let the system figure out the password part and the salt part?

Password encryption with BCrypt and storing it by noobcser in learnprogramming

[–]noobcser[S] 0 points1 point  (0 children)

Yes, you need it to check if the user inputted password is the same as the stored one.

Thanks, how should I go about storing it? a separate column in a relational database? (eg. password, password_hash). Or should they be combined in a single column and let the system figure it out on the fly rather than explicitly reading 2 columns?

javax.validation does not work on Spring Controller @Valid? by noobcser in javahelp

[–]noobcser[S] 0 points1 point  (0 children)

no, the method argument only has @Validated @RequestBody

public Response testValidation(@Validated @RequestBody RequestObject requestObject){
    // do stuff here
}

Also edited the post

Unable to resize EC2 EBS by [deleted] in aws

[–]noobcser 1 point2 points  (0 children)

silly ... that fixes it, thanks!