8

We are recruiting a front-end developer for 90k/year.
He refused to implement a simple ordering on our test, telling us “There are libraries to do that”. Apparently, TypeScript is not front-end.
Kindoff questioning our decision now.

Comments
  • 2
    He’s not wrong though.

    He should still write it though so you can assess his work. Unless you really need him, it’s his problem if he doesn’t get hired.
  • 4
    @IAmAnIssue Yes he is right. For most common tables there are excellent libraries for sorting/filtering on front-end. The problem is when you are over that scope. Some of columns have user defined sorting order. At this point 90% of common libraries fail. Quick search ignoring accents like “é” and you’ve lost 75% libraries. We work on this project for 4 years, we’ve explored a lot :)
  • 1
    @NoToJavaScript makes sense.

    Java has a built-in way to sort lists with a user-defined order (have your objects implement Comparable or pass an instance of Comparator to the sort function). So does python (pass function reference to sorted). I haven’t used JS/TS enough to know that it doesn’t have that. Shrug
  • 1
    @IAmAnIssue Yes, but I was talking about quick search in the results already returned by back end. Thre is no API calls here. Filtering already present data.
    We have our custom String.prototype.containsNoAccents. But very few external libraries actually allow to hook up custom compare/search function

    Edit : Implementation (TS)

    if (!String.prototype.containsNoAccents) {
    String.prototype.containsNoAccents = function (s: string): boolean {
    s = s.trim();
    if (s.length == 0) {
    return true;
    }
    var folded = (<string>this.foldAccents()).toLocaleLowerCase();
    var foldedsearch = s.foldAccents().toLocaleLowerCase();
    return folded.indexOf(foldedsearch) >= 0;
    };
    }
  • 1
    Hire me.
  • 3
    @NoToJavaScript wait. You pollute String prototype? Never hire me.
  • 0
    @NoToJavaScript this sorting is backend logic. Why you are putting backend logic into frontend?
  • 0
    Just create a sortstring/filterstring for each entry in Backend
  • 0
    Where are you located? If you're willing to go remote you can hire top talent from my country with that kind of money
  • 0
    @zemaitis No it's not. Data is already on the page.
  • 0
    @Cultist Ohh ! We only have 2 methods on it ! (These 2 mentioned).

    It allows shorter code and it is used a lot ! (basiclly at least 2-3 places on each page)
Add Comment