RubberDuck
  • Member for 7 years, 9 months
  • Last seen this week
Selecting from a database into a DataGridView
0 votes

I'll try not to rehash what others have said already. Indentation matters. The harder it is to read the code, the harder it is to maintain. Everything inside of Sub...End Sub should be indented one ...

View answer
Generate and validate EAN-13 barcodes
Accepted answer
0 votes

I’m just going to go line by line through part of your calculator class. namespace Ean13Calc { public static class InternationalArticleNumber13Calculator { Good name for the class. Very ...

View answer
Basic API wrapper around a Restful service - follow-up
0 votes

All of these strings should be moved to a configuration file. private const string BaseUrl = "https://public.Topman.com/"; private const string AcceptTenant = "uk"; private const string ...

View answer
Linq-to-SQL DAL on a Windows Forms project
0 votes

Your repository class has a Disposable member, so it should implement IDisposable. public class PersonRepository { private readonly MainDBDataContext myDB; But I personally don't like doing ...

View answer
A more efficient way of extracting a name from a string?
0 votes

What happens if your OPs guys screw up and don't enter a manager for somebody? Or your code happens upon the owner, who obviously doesn't have a manager? What happens then? I'll tell you what happens,...

View answer
Unit testing F# code without using an existing test library (MSTest, xUnit, etc.)
0 votes

One thing that bugs me is that I there is some redundancy by specifying the test function and then including it in a list inside a tuple. That's a familiar smell. I came across the same thing ...

View answer
Xml messages processing networkstream
0 votes

I can't speak to the performance, but you should make sure your resources get closed properly when an exception occurs. Either switch to a using statement, or move your clean up code to a finally ...

View answer
Simple complex number class
0 votes

I haven't thought this entirely through, but I can see subtle bugs happening in the client code because they've accidentally swapped the real and imaginary parts. Would it be better to create types ...

View answer
JobTypeLogic and JobType classes in MVC business logic
0 votes

You could create a generic abstract base class to inherit from. I wouldn't, but I'll get to that later. First, let's look at the base class. abstract class BusinessBase<TRepository<...

View answer
NewtonSoft Json.Net serialiser
0 votes

A minor point, but what if you want to create a single threaded Serializer as well? I would rename your interface to something like IAsyncSerializer so that you could have a different interface ...

View answer
Counting business days in a month, ignoring holidays
0 votes

I'd like to share something with you. Another reviewer kind of beat you up for leaving this commented out code. --UPDATE CALENDAR_DT -- SET business_day_number = new_number -- ...

View answer
Click handlers for two to ten buttons
0 votes

The advice I have to give assumes that formFilter1 and formFilter2 both inherit from a common base class FormFilter. If they don't, you will need to change them in order for this to work. We're going ...

View answer
Shapes that can be saved to a database
0 votes

I would create a Shape interface and classes for each type of shape. Each different shape class would then implement an Add and a CalculateArea method specific to that particular shape.

View answer
Converting base-10 numbers into base-26 letters
0 votes

I realize this is an old post, but no one mentioned this. ' validate input; no negative numbers or decimals If asLong < 0 Or InStr(inString, ".") Then MsgBox "Cannot process negative values ...

View answer
Cautious File Writer
0 votes

I think some of your methods may be trying to do a little too much. For example: def self.rename_with_old_and_number_appended(filename) And def self.rename_with_old_appended(filename) Seeing the ...

View answer
Querying .NET DataSet and ignore rows that contain NULL
0 votes

This is terribly nit picky, but the whitespace is inconsistent. Give this line some breathing space. .Select(x=>x.Value) In a larger sample of code, this kind of thing becomes hard to read.

View answer
Attempt to calculate age in VB.NET
0 votes

I doubt anyone will be using the code in the year 2100, but you should know that your solution would be off by a day if it was being used in that far flung future. In the Gregorian calendar 3 ...

View answer
1
15 16 17 18
19