usability – Interface to choose how many results I want to see

Where I work we have this dialog box that comes up when you search for a certain word in the system:
enter image description here

If the user says ‘no’, instead of not loading any results, the system loads either 10.000 or 1.000 results depending on the value of available results in all.

The previous dialog box asked the user two questions, which was obviously very confusing because if the user chose ‘no’ the system would show 10.000 records and if they chose ‘cancel’ it wouldn’t show anything and ‘yes’ the system would show all results:

enter image description here

I have tried to change the microcopy of the buttons but not sure this would work:

enter image description here

So my question is: is there another way to let the user choose how many results they want to see in this case?

Track Bandwidth on shared interface


On our servers running FreeBSD, we’ve allocated multiple public ip addresses to host different clients on single eth0 interface. The purpose of allocating separate ip to each client is to distinguish their traffic from one another.

Now the problem is, as each of our clients is using separate ip but interface/port is same due to which monitoring tools like nload and iftop are only able to track cumulative interface bandwidth and to track how much bandwidth each client is consuming we need to calculate bandwidth usage based on public ips that are allocated to each client. Please suggest some tools or ways of achieving this?

user interface – Tool/media/platform to host query tool backed with Python

In making a simple query form, I am looking for a way to actualize this idea.

enter image description here

Basically,

  1. it let users to input some strings.
  2. by clicking the button, a Python script to examine if the user’s input matches any keys in a preset (Python) dictionary.
  3. if the input has a match, it returns the value. Otherwise an error message.

This tool will be used and circulated internally in a company.

Previously I want to make it in Excel using VBA to activate Python script. However online version of Excel cannot run VBA, and at the user end, there’s no Python installed.

I don’t know what tool and platform can help me to actualize this.

So I’m looking for other tool/media/platform, for example Microsoft Office family products can help me actualize this.

Can anybody please shed some light? Thank you.

What would be a proper way to build a web-based application interface to avoid html manipulation?

… how I can build a compiled application interface …

Unlike browser-based applications, executables have to be compiled for (and deployed to and tested on) each target operating system. That’s no small job. If you really want to spend the rest of your career fire-fighting the latest Microsoft update that’s broken your favourite Windows UI widget, Good Luck.
At least writing browser-based applications, you’re working ion a more insulated world (although not entirely without its own “challenges”).

… to increase both speed and security …

What makes you think a compiled application will be any more secure that what you have now?

OK, people can’t look at the HTML source code, but what does that matter? There shouldn’t be anything “sensitive” held at the client end anyway. You should regard it as completely untrustworthy. That’s why we have TLS, server-side validation and authentication and all those other, Good Things that we jealously guard on our servers.

What makes you think it will be any faster than what you have already?

By far the slowest operation in all this will be pushing the request to the server and waiting for the response. Just making the client application go (a tiny) bit faster is not going to make any major inroads into that.

unity – Refactoring out asynchronous webrequests to an interface

I have a Unity project with UnityWebRequest calls in it. They are all working correctly, but I’d like to refactor them out (they are implemented pretty badly at the moment).

The way I would like to do this is with a WebRequestSender class that implements an IWebRequest interface. Each call would return a WebResult object that I can use.

public class WebResult
{
    public long ResponseCode { get; set; }
    public bool IsError { get; set; }
    public string Value { get; set; }

    public static WebResult Success(long responseCode, string value)
    {
        return new WebResult
        {
            IsError = false,
            ResponseCode = responseCode,
            Value = value
        };
    }

    public static WebResult Failure(long responseCode)
    {
        return new WebResult
        {
            IsError = true,
            ResponseCode = responseCode,
        };
    }
}

I’m having trouble understanding how to implement the interface, as these calls are asynchronous.

Ideally, in the script when I need to make a call, I would have one line, like so:

WebRequest.Login(form) and that would return the result. I’m not sure what I have to add for it to wait for the call, or however it is executed.

public interface IWebRequest
{
    WebResult Register(WWWForm form);
}

Do I need to alter the return object so it allows for asynchronous calls? Or do I have to change the implementation/the call of the implementation?

As for my implementation, it doesn’t work. The return statement on the Register function isn’t called (even if it was, I’m not sure the return object would be populated?) Sample below:

public class WebRequestSender : MonoBehaviour, IWebRequest
{
    private const string REGISTER_URL = "http://localhost:51044/api/Users/Register";

    private WebResult webResult;

    public WebResult Register(WWWForm form)
    {
        StartCoroutine(MakeWebCall(REGISTER_URL, form, (UnityWebRequest webRequest) => RegisterDelegate(webRequest)));

        return webResult;
    }

    private void RegisterDelegate(UnityWebRequest webRequest)
    {
        if (webRequest.isHttpError || webRequest.isNetworkError)
        {
            webResult = WebResult.Failure(webRequest.responseCode);
        }
        else
        {
            webResult = WebResult.Success(webRequest.responseCode, webRequest.downloadHandler.text);
        }
    }

    private IEnumerator MakeWebCall(string url, WWWForm form, Action<UnityWebRequest> finishDelegate)
    {
        using (UnityWebRequest www = UnityWebRequest.Post(url, form))
        {
            yield return www.SendWebRequest();
            finishDelegate(www);
        }
    }
}

8 – How can I get list of classes implementing particular interface?

I need to have a list of classes implementing Drupal 8 User Auth Interface & be able to reference a particular implementation class (such as Facebook Auth). How do I do this please? I don’t want to directly modify the core Drupal 8 User Auth class which is currently the only class implementing the User Auth Interface.

linux – How does an Interface know which interface to route packets to?

I have 2 interfaces on my Ubuntu18.04.

wlp3s0 which has internet connection and vboxnet0 which lacks one.

I followed some online guides and understood that I needed to enable IP forwarding.

I did that and everything works fine.

I was wondering how did the vboxnet0 interface know that it needed to forward its packets to wlp3s0 and not some other interface(if I have more than 2)?

design – Designing a public facing Java interface for future extensibility (API evolution)

I develop an in-house Java framework. I provide an interface so that my end users can provide their own custom implementation (i.e. plugin/SPI).

public interface SomePlugin {
    SomeResponse doSomething(SomeRequest request);
}

There are a number of small configurations to be made, some required and some optional. For example: plugin name, response formatter.

My initial interface looked like this (V1):

public interface SomePlugin { // V1
    String getName();
    default SomeFormatter getResponseFormatter() { return new DefaultFormatter(); }
    SomeResponse doSomething(SomeRequest request);
}

Over time I learned this is not easily extensible, without breaking existing user implementations or abusing the default keyword. Reasons:

  • What if I want to receive another config value, e.g. plugin description?
  • What if I need to provide an alternative way to receive response formatting?

V2

Now, this blog post suggests that I may use “argument objects” to better achieve this.

It is generally a bad idea to have non-void methods in SPIs as you will never be able to change the return type of a method again. Ideally, you should have argument types that accept “outcomes”.

public interface SomePlugin { // V2
    void configure(SomeConfigurator config);
    SomeResponse doSomething(SomeRequest request);  
}

public interface SomeConfigurator {
    void setName(String name);
    void setDescription(String description);
    void useFormat(SomeFormatter formatter);
    void useFormat(SomeParser parser, SomeOutputBuilder builder);
}
public class MyPlugin { // Usage example
    void configure(SomeConfigurator config) {
        config.setName("Test plugin");
        config.useFormat(new MyFormatter());
    }
    ...
}

This nicely solves the extension/evolution problem that my initial design (V1) had.

  • Deprecation and addition are easier.
  • I can now receive multiple objects at once, i.e. parser and builder, without creating a wrapper object.
  • I can overload some methods because what was a return type is now a parameter.

I lose the required-ness of mandatory configs, i.e. users may forget to provide name and it will still compile. But I think this is an acceptable trade-off for maintainability, with help of Javadoc and runtime checks.

V3

One concern on the concept of “argument objects” with void return type is that it is a foreign idea. When I showed this prototype to my end users, they didn’t grasp how to use it unless an example was provided. This leads me to consider:

public interface SomePlugin { // V3
    SomeConfig getConfig();
    SomeResponse doSomething(SomeRequest request);  
}

public final class SomeConfig {
    private String name;
    private String description = "";
    private SomeFormatter formatter = new DefaultFormatter();
    private SomeParser parser;
    private SomeOutputBuilder builder;
    ... getters and setters ...
}
public class MyPlugin { // Usage example
    SomeConfig getConfig() {
        SomeConfig config = new SomeConfig();
        config.setName("Test plugin");
        config.useFormat(new MyFormatter());
        return config;
    }
    ...
}

Now, this feels more like a “traditional” Java and should be more intuitive to my end users. I still get the benefits of V2. It’s unlikely that I’d have to worry about deprecating or replacing getConfig() itself.

One small con: SomeConfig is now more verbose with all getters and setters, compared to SomeConfigurator in V2 which looked like a clean “header file”. Despite this, I feel like V3 is the way to go.

Does my reasoning make sense? Are there any reasons to favor V2 over V3, or do you have other approaches to suggest? Thanks!

8 – Change sort order of SOURCE STRING list at User interface translation page to alphabetical instead of date created

At the User interface translation page (/admin/config/regional/translate) the SOURCE STRING list seems to be ordered by creation date/time (it is for strings I add). Is there a “good” (non-hackish) way to change the order to alphabetical? I haven’t found anything in the interface.

For those who wonder why I want this, I use interface translation in an unconventional way. Instead of putting literals like t("Choose your options") in my code, I put in a key like t(‘rsc-string-choose-options’) (rsc is the name of my custom module). Then as the translation, I put in “Choose your options”. This allows me to use “keys” for all strings (literals, messages, titles, email body text, etc.). It’s easy to look up my keys because they all begin with ‘rsc-‘ followed by ‘string’, ‘message’, ’email’, etc. depending on usage. Doing this provide a nice interface for editors to go in and change the text of the strings, since they can look them up either by translation or by key. I also wrote a nice utility that allows me to add, remove, rename, and test keys (i.e. translation strings). It’s working very well, but it would make review much easier if the source strings were alphabetical.

Spin Servers Launches New Website, Order Experience, and Client Interface

New website released by Spin Servers introduces a new order experience and client interface

May 26, 2020

Dallas, TX — Spin Servers, a Dallas IaaS provider offering dedicated servers, hybrid servers, cloud hosting, enterprise hosting solutions, and more – announced today a major milestone by launching its new website. After months of planning and work, the new interface is more intuitive than ever before with a modernistic design, new ordering experience, and elegant client interface.

“The new Spin Servers experience makes our services more accessible to the masses, with the goal of simplification in mind.” said Arnav Kejriwal, Director at Spin Servers. “With the roll-out of our new website, not only are we featuring our all new dedicated server packages where you can instantly deploy bare metal servers with up to 512 GB RAM at your fingertips, but we also now have specific pages designed to explain the features that are standard with every Spin Servers service: Virtual Private Clouds (VPC), Flexible IP (FlexIP), Bring Your Own IPs (BYOI), and DDoS Protection.”

The new website additionally unveils a proprietary order form – which provides a more streamlined experience than ever available before. Within the same page, customers are now able to add multiple quantities of each server configuration.

“The new order experience better reflects our business motto to spin up servers fast and seamlessly. We have a minimum of hundreds of servers in stock at all times, and customers don’t need to order each server one by one anymore. They can instead configure everything within one cart, one page, within just a few clicks of a button. For customers looking to instantly deploy bare metal servers in mass-quantities, this can save a ton of time as opposed to the traditional method of ordering.” Arnav elaborated.

To learn more about Spin Servers or to view its new website launch, visit https://www.spinservers.com/

About Spin Servers:

Spin Servers is a privately owned US-based provider of dedicated servers, colocation, and cloud solutions. Spin Servers’ motto is to let you “spin up servers” fast, seamlessly, and affordably. Spin Servers is one of the first and only hosting providers to be an integrated hardware reseller. Its sister company, MET International has been in the server hardware business since 1994. With Spin Servers being vertically-integrated with MET International, servers are considered an asset, not an expense, delivering cost savings of up to 50% to you, while providing exceptionally high level of service. Server hosting services are delivered out of its state-of-the-art Dallas, TX datacenter facility which meets all HIPAA, PCI and SOC 2 Standards.