Questions tagged [utilities]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
0 answers
150 views

Forgetting about the utils [closed]

Let's say my language's standard library does not include TrickyFunction(). Since implementation seems quite trivial for me, I decide to create utils in the project and add such function, for others ...
JoshThunar's user avatar
2 votes
4 answers
696 views

Is it ok to test an external function?

I have a utility function called connectToMongoDB() which connects to MongoDB. Basically, it creates a client for MongoDB and returns that. I'm making a library and I'm thinking of unit testing the ...
DaCool1's user avatar
  • 37
4 votes
3 answers
3k views

What about Utility-Classes, but without hard dependencies?

The average utility class: A stateless class that provides some functionality by exposing static methods. Its default constructor is private to avoid instantiation. When ever the average utility class ...
Diggi55's user avatar
  • 51
1 vote
2 answers
147 views

Should we switch to standard functions for utilities?

Many projects need a set of various utilities. There is some discussion about where to place them. But what happens if the utility becomes part of the standard? For example, C++ kept adding to the ...
Paul92's user avatar
  • 2,571
0 votes
1 answer
2k views

The usefulness of java util classes to call a service (to create a model) as opposed to using that services's impl

Example I will explain the paradigm below but I am specifically talking about Liferay's Service Builder code for anyone who knows that platform. Basically in Liferay you can definite a model and it'...
Chris Maggiulli's user avatar
1 vote
3 answers
6k views

Utility class or helper function in class?

I'm Working with php and we using enum's by create an Abstract class that mocking enum behavior - but my question is cross-languages. Where all the helper functions like toString, getEnumTypes, ...
Michael's user avatar
  • 197
17 votes
2 answers
34k views

Unit testing utility classes

All of us have some utility classes, which contain only static methods, for usage from different sources. Now, there can be two approaches which can be taken towards testing this piece of code. ...
alpha_ulrich's user avatar
6 votes
2 answers
615 views

Static console object or dependency injection?

For a current project I have created a Console class which wraps up C++'s usual cout, writes output to a file or uses Console::WriteLine depending on the environment. Currently I've setup my code base ...
sydan's user avatar
  • 373
3 votes
1 answer
2k views

Where do utility libraries fit in a layered architecture?

Consider this mock-up of a software stack designed with layered architecture in mind : Every application layer is decoupled through API calls, but a memory handling library is used throughout. All ...
Mobius's user avatar
  • 51
1 vote
3 answers
1k views

Refactoring - Utility classes behavior under a common interface

I was suggested to put my question here, so I'm doing so ;) I need a common interface which represents some specific behavior: public interface Contract(){ public void methodA(); public void ...
radekEm's user avatar
  • 367
0 votes
1 answer
596 views

What is ServletUtilities?

The answer in this question suggests creating a ServletUtilities class to handle text conversion between Java strings and XML text. Generally when you create a JEE web application you put together ...
dwjohnston's user avatar
  • 2,543
11 votes
4 answers
3k views

Few big libraries or many small libraries?

Over the course of some months I've created a little framework for game development that I currently include in all of my projects. The framework depends on SFML, LUA, JSONcpp, and other libraries. ...
Vittorio Romeo's user avatar
4 votes
2 answers
323 views

Need some advice on CLI design, I need to provide simple but powerful command line options

I am writing a utility that runs on RHEL5 command line. I need my command line options to be simple but powerful. I looked at the various UNIX utilities to get an idea of how simple command line ...
howtechstuffworks's user avatar
1 vote
3 answers
350 views

Converting mysql and SQLServer tables quickly in an update utility

The requirements are to take an existing list of identical tables (AAA0001 - AAA9999) which generally don't meed our current requirements and need to be swapped out with three tables (XXX0001-XXX999, ...
Peter Turner's user avatar
  • 6,897
1 vote
1 answer
154 views

An application to get statistical data about HTTP Request/Response

I'm looking for an application which takes the address of a website, browses that website, and provides reports based on some user-defined criteria about the HTTP requests/responses. For example, this ...
Saeed Neamati's user avatar