instruction
stringlengths
71
95.1k
My goal is to reduce processing time significantly (if possible) by making this working code more efficient. Currently 50k row by 105 column data taking about overall 2 hours to process. Share of this piece is 95%. This piece is a key part of my Python 3.6.3 script that compares two set of list of lists element by elem...
Correct usage of snprintf involves very long and repetitive lines: if (snprintf(buff, sizeof(buff), format, ...) >= (int)sizeof(buff)) goto err; I first encapsulated this macro: #define SSIZEOF(x) ((ssize_t)sizeof(x)). The result is I now have a slightly shorter line: if (snprintf(buff, sizeof(buff), format, ...
I currently have these two methods. One method returns all records, while the other one returns only a specific record. function GetLeaveRequestDetailsAll($leaveCurrentStatus){ global $connPDO; $sql = "select *, emp.Employee_Name, emp.Designation, emp.Emp_Dept_Category, lt.Leave_Name from tbl_emp_...
I'd like to find a more elegant solution to the following. Below appears correct, but it's hard to read. Is my first use of the map function below poor in stylistic terms? It feels that way, and I'd like to pin down why. I wonder what is a nicer way to achieve this. ;; ANSI Common Lisp ex 3.3, p56. ;; "Define a fun...
I wrote this just for some fun and also to practise my ES6 skills. When user key in the Konami Cheat Code(⬆️⬆️⬇️⬇️⬅️➡️⬅️➡️️️↩️) anywhere in the page, it should trigger a callback. In the following example, it should trigger an alert. What could be improved? Are there more ES6 features I could use in this code? const {o...
I’m moving from c98 to c++14 and I’m trying to figure out how to write move correctly. I just wrote the simplest list with no functionality, just testing the construction and copy behavior. I would love to get an input as to what I can improve Thanks #ifndef EXERCIS_SIMPLELIST_H #define EXERCIS_SIMPLELIST_H #include <...
I've made a email generator, that uses a HTML template and replaces keywords in the template with information taken from a database. I'm looking to see if there is a way to improve the coding. public class EmailGenerator : IEmailGenerator { private string mergeTemplate(string template, object obj) { Reg...
I am writing a simple Telegram bot in Python 3 using the python-telegram-bot library. A command is a Telegram message that looks like this: /command_name arg1 arg2 arg3.... The bot should handle the users' messages by changing its internal state and making responses to the users. I was not very happy with the 'command ...
My job is to supervise a junior developer, but I am mainly a javascript developer and my CSS skills are a bit basic. However, I spotted some things in his CSS code that seem unorthodox to me. He committed some CSS code similar to the one I post here: <div class="label-item"> <div class="label-image-container"> ...
I just ended the console snake game and want to review it. I hope you'll review my codestyle (e.g. I don't know what to do with #ifdef inserts in init_game() and end_game() functions) and leave some comments about the game logic, maybe about the view (draw function). Edit: thank you pacmaninbw for remark! I added misse...
I have a program that read thousands of lines and return the value that I need. The problem is that request take a lot of time probably like 1min just to search and paste the value, even when I'm saving the code it takes a lot of time... I think it is around this line that the code is slow : If Sheets("MT950").Cells(li...
I wrote this code in my .bashrc to remap ls to honor .hidden files. I'm pretty new to shell/bash scripting, so I feel like this is not the most performant way to handle this, and it has some limitations. I would appreciate any suggestions regarding performance improvements, limitation reduction, or common best practice...
I have the following class which is used in a WebApi AspNetCore application as a singleton instance to store Strategy objects (reference type). The class is /// <summary> /// Class to allow singleton access to a common thread safe registry of registered strategies. /// </summary> public class StrategyRegister : IStrate...
I created a GitHub repository containing my code solutions for some of the exercises proposed in the book. I updated my solution for the problem 1.6 here. Description A function that compress the original string and store the compressed string in compress ex. aabcccccaaa will become a2blc5a3. If the compressed st...
I've got some equipment ("tool") that communicates over CANbus that I need to communicate with. I'm using a USB->CAN dongle that provides a basic .Net control library. I'm in the process of writing a library that abstracts out tool communication, and I'd like some comments on the design. Note that I've mostly been li...
I have an existing overloaded set of functions that I cannot change and need to be tested: object Validator { fun validateRange(min: Int, max: Int): Boolean = true fun validateRange(min: Long, max: Long): Boolean = true fun validateRange(min: Double, max: Double): Boolean = true fun validateRange(min: S...
This question has 2 possible solutions and I am trying to implement the DFS solution. Here is the Trie and DFS solution: Boggle using Trie and DFS Please review for performance. Given a dictionary, a method to do lookup in dictionary and a M x N board where every cell has one character. Find all possible words that ...
https://leetcode.com/problems/implement-strstr/ I implemented Rabin-Karp algorithm https://en.wikipedia.org/wiki/Rabin%E2%80%93Karp_algorithm please review for performance, also if you were in an interview what do you think about using functions like GetHashCode()? would you like the interviewee to implement the hashin...
Could I ask you to evaluate my implementation of mergesort? I think that it's consistent with \$\mathcal{O}(n \log n)\$ complexity but has a downside that I create a new result array at each step of recursion. How do you think it can be improved? public int[] mergesort(final int[] input) { return mergesort(input, 0...
In an attempt to clean out my picture collection I made a script to find all duplicate files import datetime import hashlib import json import typing from collections import defaultdict from pathlib import Path def filesize(path: Path) -> int: """returns the filesize""" return path.stat().st_size def hash_f...
I'm following Karate Chop kata for a binary search. I really wanted to avoid built in functionality within the language. I'm pretty new to C# so any recommendations is greatly appreciated. Spec: Binary chop on an int array to find the index. A binary chop (sometimes called the more prosaic binary search) finds the p...
I have a lot of files. I care about those files. I also care about good programming practices and learning proper python. Given the described context, it seemed appropriate to implement my own automated backup utility (as an exercise) What I bring here is my attempt at the task and any advice is welcome. Description: T...
I have an array allocated in C# which I am passing into unmanaged code to be modified. The following code works, but I am not sure if there are any other more 'correct' or 'efficient' methods that I am not aware of. Code.c extern "C" { class MyObject { public: int32_t X; }; __declspec(dllex...
I have created a TCP server thread which I want to keep running and listening to the IOT device (an RFID reader). I have only one client. Please review my code and provide your feedback. Are there any edge cases that would make this TCP server fail? import android.util.Log; import java.io.DataInputStream; import java...
After implementing suggestions from an earlier, related question (Python: Selection sort), I have written this code. Could you help me to improve this code? def get_input(): input_str = input("Enter elements to be sorted: ") try: lst = list(map(int, input_str.split())) except: raise TypeErro...
I have some code which moves the users position up, right, down or left depending on the direction entered. function up(field, player) { player.column = player.column + 1; field[player.row][player.column] = 'P'; } function right(field, player) { player.row = player.row + 1; field[player.row][player.c...
Context You can probably skim most of this, it's unlikely to be useful for a review and is just for background info. Also download the files I've tried to create a Boolean object - some truthy reference type which can be used in place of VBA's builtin Boolean. I have 2 motivations for this: I need an object which enc...
For a text adventure I'm writing, I need to establish an anagram X of a word Y such that letter Z of X is not letter Z of Y. In other words, ABCDEE could go to EEDCBA or DCEEBA but not ABCEED, because ABCEED matches ABCDEE at slot 5. # # amak.py: this makes an anagram of a word with no identical letter slots. # # in ot...
Following code is doing what I want but I am looking for a way how to make it nicer and more effective for i in c: for j in c: for k in c: for l in c: for m in c: if (i != j and i != k and i != l and j != k and j != l and k != l and i != m and j != m and k != m an...
I am working on a very simplified proof of concept (POC). Separation of concerns should be achieved in this project, so that in the future we have flexibility in respect of what data source we use (hence no UI in this POC) . The BLL has a POCO Fruit class, the repository interface it expects its data sources to imple...
I create a lexikon and a navigation for ZOO. I use MVVM architecture supported by ReactiveSwift. I have a few questions about my practises and whether I could write my repositories better and more clearly. I would like to know whether is it good to create a generic Repository class and inherited class from this class f...
I have this service that reads emails from a mailbox as they come and I want to extract its contents in a map structure. For now I am interested only in the actual email (no images or attachments). I started by using an enum when I wanted something simple and then extended the enum to implement an interface when I noti...
I'm new to Rust so I'm still learning how to use best practice in complex examples. Below is some code I've used in one of my programs, a simple implementation of a standard neural network. Here is a the file I'm running: https://pastebin.com/p9ntgWPK Here is the code snippet I'm particularly interested in (lines 60-72...
I am creating a request for an api using below class- class ABCDRequest { @JsonProperty("name") private var name: String? = null @JsonProperty("question") private var question: String? = null @JsonProperty("ans") private var ans: String? = null fun getName(): String? { return nam...
I wanted to implement a simple algorithm for encoding id of entries in a database to avoid: Storing the UID (unique id) in the table along with the id Complex and costly algorithm. Users to give meaning to the id in the sense: Yeah if this id is bigger than that id it was inserted later in the DB I can probably g...
I'm new to programming. This is a game with 8 dice called Pickomino in English, Regenwormen in Dutch and Heckmeck in German. It's mainly a dice throwing game. What I want to do (and not achieved yet) is to improve the autoplayer. But first I want to improve my existing code. It's the first thing I've made in Python, so...
My homework assignment: Write a function called saddle that finds saddle points in the input matrix M. For the purposes of this problem, a saddle point is defined as an element whose value is greater than or equal to every element in its row, and less than or equal to every element in its column. Note that there may b...
I already mentioned in my previous code review, there are two solutions for this problem https://www.geeksforgeeks.org/boggle-find-possible-words-board-characters/ this is the first: Find all possible words in a board of characters and here comes the second. Original question is: Given a dictionary, a method to do a l...
I am building my first REST API using data stored in my MongoDB Atlas Database. I tried to read the REST API conventions with the versioning, using plural nouns for resources and sending the right error codes. I wonder if the following code correctly follows Good Practices for REST APIs and if there is anything that ca...
I'm currently learning Node.js. To practice, I've decided to create a login server. The program goes as follows: User connects to local website (10.0.0.79, props to this users answer for helping me figure out how to set it up) User is presented with a login screen, with fields username and password. User enters the us...
I am designing my first payment service and here is my db structure. Each user can have many businesses, each business can have many products. Some are recurring, some are paid once. Each product is tied to payment method. Some products are always free, and some are paid every X days. CREATE TABLE `payment_method` ( ...
How can I improve this code? #import sys #sys.setrecursionlimit(1500) def get_input(): input_str = input("Enter elements to be sorted: ") try: lst = list(map(int, input_str.split())) except: raise TypeError("Please enter a list of integers only, seperated by a space!!") return lst def ...
EDIT: Improved/More Streamlined Code (rather than spaghetti below) now posted here: Bookkeeping Coding - Check and Create Tabs, Copy filtered Data in Loop I'm a relative newbie to coding and have "Frankensteined" my code from various pages on the web. At the moment I have no issues with this code as I have minimal lin...
I've recently created a tomato timer for terminal. It's hosted in github. My concerns are how Pythonic my code is? Is the way I'm handling state transitions good? Which areas of the text user interface I can improve? Also I've ordered the files in order of importance: first file is core logic, second ui and third util...
This following code searches for jpg files of size larger than 500 KB. Its purpose is to move/cp files, depending on their EXIF data, into folders that correspond to the files' year and month. find . -type f -iname '*.jpg' -size +500k | while read file; do yr=$(stat -f '%Sm' -t '%Y' "$file") month=$(stat -f '%S...
I am attempting to create a lock free pool of resources and I need the ability to access any one that is not already accessed and then return it back when I do not need it. This will happen very very often in many threads and I felt that a locked queue would create a lot of contention. My solution is a relatively simpl...
I'm writing a python script and do database query to get the ids of employees who are in one table but are not in another. I'm using psycopg2 module for python 2 and PostgreSQL as database. After querying from one table based on a condition, I do another query on another table to get the difference between these table...
I've got a big react app (with Redux) here that has a huge bottleneck. We have implemented a product search by using product number or product name and this search is extremely laggy. Problem: If a user types in some characters, those characters are shown in the InputField really retarded. The UI is frozen for a cou...
I'm working on a Phoenix/Absinthe application and I thought to expose encrypted sequential IDs instead of UUIDs since these are a bit shorter. Encryption on Elixir/Erlang seems very hard, so I think I'll use UUIDs eventually. Anyway I'd like to know how bad, from security perspective, is the solution I came up with: de...
The code base is split between three different files odbc.py, scrape.py, and dataprocessor.py. For ODBC, the job of this file is to take scraped data and determine whether or not those results are in a database. Ultimately, I'd like to extend this script to contain more general functionality, so that the queries that a...
I'm working on some legacy code which uses the singleton pattern. The problem I have with the traditional singleton is that the instance lives until the program terminates. This is messing up the order in which things need to get destroyed and makes it difficult to write independent unit tests. Unfortunately, I can't g...
Readability counts, but is very subjective. The following snippets are equivalent in functionality and turn a generator iterator into a chunked HTTP response in Flask. Which of those two patterns is more Pythonic, readable and convenient? A) Aspect style with function decorators that change the return value: @app.route...
I made a small application using C#, SQL Database, entity framework , and windows forms to manipulate users (Add_User , Update_User , Delete_User) and their activities (Add_Activity , Update_Activity , Delete_Activity). I created a database with 2 tables, the first one with users and a second one with the activities of...
I came to a point while refactoring using if {} else {} code with Java optionals. While optimizing code it turned to a result to this: Optional.of(myBoolean).filter(b -> b).ifPresent(b -> {/*my code if true*/}); I recognized filter(b -> b) is not the way i wanted to use optionals thus i turned it to If.is(myBoolean...
function slice(array, startingPoint, endingPoint){ if(arguments.length === 1) { return array; }else if(arguments.length === 2) { // non-int value var numberInString = startingPoint; if(typeof(startingPoint) !== 'number'){ var checkNumber = ...
How could one write in a more elegant way that if error is null, the result is true? I really need a bool as returned value. func existsFile(path string) bool { _, errStat := os.Stat(path) if errStat != nil { return false } return true }
Lets say I have simple IsSomething() method which checks, if object meets few requirements. Which approach is better? public bool IsSomething() { if (!MeetRequirementX()) return false; if (!MeetRequirementY()) return false; if (!MeetRequirementZ()) return false; return true; } Or public bool IsSomethi...
Elm is a pure functional language for the front-end. It enforces an architecture that allows programs to stay pure in an event-based setting. This simple header-only library implements a variant of the the Elm Architecture for C++17. Its small footprint and simplicity makes it easy to understand and quick to get starte...
This is the first big project for me and I am not sure which is the correct way to structure the code yet. Is it okay to have so many classes and functions? What else should I improve? import pygame import sys import random pygame.init() pygame.font.init() clock = pygame.time.Clock() font = pygame.font.SysFont('Mono...
Getting started: For a given number x (say -5) I want to know which element of a list y (say [2, -6]), minimizes the value of distance function d (say the absolute value) which applied on x and all elements of y. My current solution to this problem is x = -5 y = [2, -6] def d(a1, a2): return abs(a1-a2) # more compl...
I am going to simulate a particle system, the particles are infinitesimal points which apply forces on the neighbors and I need a fast way of making proximity checks, they are going to have a maximum check radius but not a minimum and will be almost evenly spaced. The simulation will be very similar to this: https://yo...
I would like to know if I'm writing a plugin for jquery correctly. I followed the official guide and also added some tweaks that I've found from various sources over time. While this works perfectly, I don't know if I'm doing something wrong. This is the sample: (function($) { var plugin = "my_plugin_name"; var...
I implemented the following class (it works) and I just want to hear your opinions about best practices and what can be improved. The idea was to do it using mostly arrays. The class just finds the peak elements in an array with respect to their neighbors. The first element and the last element are ignored. Example: {3...
My code is currently offloading parsed data into multiple spreadsheets, but it's pretty slow: about 110k rows and 35 columns in 3.5 minutes. I was wondering if there were a more efficient way of looping through my collection of dictionaries. Sub getData(Parsed As Object, company As String, a, wb) 'Parsed contai...
In "The Joy of Clojure", 2nd edition, code for quicksort is introduced on page 133 that I found hard to digest. I have rewritten it to make it clearer (at least to myself). Here is the original: (defn sort-parts-joc [work] (lazy-seq (loop [[part & parts] work] (if-let [[pivot & xs] (seq part)] (let...
I have been implementing a library of the PLC function blocks. One of the function blocks is the "Timer Pulse" function block which behavior is following: I have implemented this function block in this manner Tpulse.h: #include <stdint.h> #include "LogicBlk.h" namespace LogicBlocks { // Timer Pulse i.e. logic one a...
I'm looking for specific feedback on a major design change that I plan on making to my personal website (https://aleksandrhovhannisyan.github.io/). Currently, the Projects section contains hardcoded HTML. With my current approach, each time I want to add a new project, I have to copy-paste an existing project div and c...
I have already done many of the Project Euler questions in other languages before, but whenever learning a new language, I like to do the problems again in that language. Here is my elixir version of Find the sum of all Fibonacci numbers below 4,000,000. stream = Stream.unfold({0,1}, fn {a, b} -> {a, {b, a + b}} en...
I'm trying to follow this Vulkan API tutorial and have come up with an implementation that I don't completely loathe. The VkUtf8StringArray class is my least favorite thing and would like to know if there are better ways I structure things and/or make them safer... Note: Depends on a helper file to load the dll at run-...
I have a mapping application which takes string arguments in the form of string arrays. I parse these and then perform an action on the map. One of these is MoveVertex which lets the user pass in the name of an existing shape/feature on the map, the index of the vertex to move, and a new x,y location to move that verte...
I am learning about OOP so it would be great if you can give me feedback on how to improve my code and OOP design. This is a currency converter. Firstly, it will call a method to add 2 currencies and commission information and then it converts to another currency whose input is source currency and amount: import pytest...
I have incoming data from an absolute rotary encoder. It is 24 bits wide. 12 bits are the number of turns and 12 bits are the angle. I'm reading the data with an Arduino and sending it to the computer over a serial port. The most natural thing to do would be to combine all of the bits and send it as 3 bytes. Splitting ...
I have been trying to write the md5 hashes for all files in a directory and its subdirectories to a file. Ideally, replicating the output of the Unix command find . -type f -exec md5sum {} + (i.e. two columns: lowercase hashes and relative file paths [with forward slashes] separated by a space and terminated only by a ...
How to improve this code? In C++ we use templates to write function for all data types. How to write such code in python? def get_input(): #to get input from user input_str = input("Enter elements to be sorted: ") try: lst = list(map(int, input_str.split())) #make a list of integers from input string ...
I made a little gambling batch file and wanted to know if there was a better way to do the randomization and the checker. :num1 cls echo Getting results! Please wait. set /A g11=%random% %% 10 goto num2 :num2 cls echo Getting results! Please wait.. set /A g22=%random% %% 10 goto num3 :num3 cls echo Gett...
I am using the following query to search for the nearest city to my location from the cities table using latitude and longitude. The query also checks whether the nearest cities to my location have more than 1 shops of a given category. Only then a city is selected. The query works fine but it takes more than 5 seconds...
I have a review request about this part of the code: let private startReading (client:TcpClient) (bus:IBus) = //TODO check if that can be changed to rec parameter let frameNumber = ref 0 let rec StartReading (client:TcpClient) = async{ match client with | null -> async { ret...
I wrote a code to create a regression tree for a synthetic train data of size Np. The idea is, first I have the source node (which consists of all set of points) represented as a dictionary {'points':..., 'avg':..., 'left_node':..., 'right_node', 'split_point': }. The left and right nodes are the leafs after the splitt...
I've written a simple asynchronous logger (playground): mod logger { use std::sync::mpsc::{channel, Sender}; use time::now; pub type LogError = std::sync::mpsc::SendError<String>; /// Runs a function that can logs asynchronously. pub fn log<F, T>(f: F) -> T where F: FnOnce(Logger) -> ...
The exact link to the question : https://www.spoj.com/problems/DIVSUM2/ Input: An integer stating the number of test cases (equal to 500), and that many lines follow, each containing one integer between \$1\$ and \$10^{16}\$ inclusive. Output: Print one integer, the sum of the proper divisors of the number. An easie...
I am working on an API to return all the possible flight route between point A and B. I have a set of data which includes the flight number, airline, departure airport, destination airport, departure time, and arrival time. Keep in mind I am also catering connecting flights. But the connections can only happen between ...
I have a typing log in which rows are grouped by consecutive package_name, and within those groups rows are grouped if they are logged within 180,000 ms from each other. This is working but is there a cleaner way to achieve it? An edge case would be when more than 1000 consecutive episodes are logged for the same packa...
I have a list of ~27000 objects. Each object represents a line from a file where each line is one record of a measurement from some instrument. The most import aspects of the object are: Instrument name: int (49099, 89, …) Station Name: string (K-900, MK-45, …) Time: datetime object (13:34:17 01/02/2017) All these ...
After writing swnprintfand sbprintf in C (Encapsulating snprintf to avoid repetition of sizeof), I've written a C++ version of them: swnprintf: Similar to snprintf. Properties: (properties not mentioned shall be the same as snprintf) It writes the actual value of characters written (excluding the NUL terminator) thr...
For my blazor library which is a modification of this awesome library I have to convert an ExpandoObject into a Dictionary<string, object> since ExpandoObjects aren't serialized properly in the newest preview versions of dotnet-core. See my question related to this for more details. My current approach goes as follows:...
As said, this is take 2 (see linked for Take 1 for my massively beginner code: https://codereview.stackexchange.com/questions/223236/) As an overview: I manage the bookkeeping for 40+ companies in an excel workbook. All data is added to a central sheet "Amalgamated Data" and from there data for all transactions for ea...
I'm trying to optimally solve codeforces problem 763A: Each New Year Timofey and his friends cut down a tree of n vertices and bring it home. After that they paint all the n its vertices, so that the i-th vertex gets color ci. Now it's time for Timofey birthday, and his mother asked him to remove the tree. Timof...
This is a piece of test code made for the Angular application. The router object is a mock provided by the RouterTestingModule dependency. I wonder if such a test can be considered a unit test (because it actually tests only one element and the fact that it calls some method - without checking its result), or should i...
I have this code ready and it works just fine. But what are the ways by which I can improve this code? I have no CS background and this is my first coding project. I could not paste my entire code so I'm posting my github project link. Any recommendations on that would also be appreciated. import pygame pygame.init() ...
I have solved a previous year question of 2018 codevita (link) in Python. Problem Description: Rotate a given String in the specified direction by specified magnitude. After each rotation make a note of the first character of the rotated String, After all rotation are performed the accumulated first character as not...
So for my class, I have to design a game that will deal out one card to for each player. I also need to use functions to accomplish this one for the high card game, and another for the face value of the card. import random def high_card(): print("\n High Card") print("-----------") # Read each player's nam...
I was asked this in an interview yesterday: You get an array of segments (segment contains 2 numbers, representing days count (say in a month, but could be in a year, etc.): start, end). You need to find the minimum number of days where you can meet as many of your friends. For example, if you get [2, 5], [4, 8], [6, 1...
Was asked this in an interview yesterday: You are given an array of numbers (not digits, but numbers: e.g. 9, 23, 184, 102, etc.) - you need to construct the largest number from it. For example: you get 21, 2, 10 - the largest number is 22110. This is my solution, I wonder if you can improve this? def maximum_number(a...
I am currently developing a REST service in ASP.NET Core 2.2 that acts as a wrapper upon a REST API provided by a reporting solution. The reporting systems REST API authenticates the user based on a username and a password and subsequent requests must contain both a token and the cookies received during the authenticat...
I was toying with a way force fixed timestep loop iterations in C and came up with a fairly simple timer struct (quite different from Pausable Timer Implementation for SDL in C and decided to put it out for review. The timerstruct itself is: typedef struct ktimer_t { struct timespec next; /* timespec ...
I'm new in JavaScript, so I was looking for some reviews and advice for better code quality. import Todo from './Todo.js'; export default class Repository { constructor(todos = []) { this.todos = todos; this.storage = localStorage; } addTodo(todo, save=true) { this.todos = [...this.todos.filter(item...
I have this code for a post request, when the user wants to change his password. Because of all the cases and the following page renders the code came out really ugly. Is there a better way to structure this? (It works fine and does what I want.) // Check if old password is correct SQL.getUserFromDB(request.session...
Because my original question was lacking many details, I have been advised to ask a new question. I will repeat the important parts of the original question and add examples etc to hopefully make it clear. For my blazor library which is a modification of this awesome library I have to convert an ExpandoObject into a Di...
This is a follow up question on this post This is what I changed on my previous code: I use Exchanger and PairCurrency class instead of Bank I renamed addRate and addCommission to setRate and setCommission respectively Exchanger object contains multiple PairCurrency objects which can be added to Exchanger by addPair...
Im curious how to improve this code. I don't like creating objects of four different types of reporters, because this could provide some problems with testing. How about the rest of this code, for example the if-statement below? EDIT: This is a fragment of application to measure loading time of our website and few othe...