1,685 reputation
816
bio website mcpruitt.github.io
location Flint, MI
age 29
visits member for 2 years
seen Oct 23 at 23:43

Eclectic coder with a focus on C# and PHP. I like to sample all that the code monkey jungle has to offer.


Nov
16
awarded  Yearling
Jun
5
comment WPF4 Unleashed - how does converting child elements work?
The sentence directly after your example explains: In this case, the first XAML snippet works because a type converter exists that can convert strings such as "White" (or "white" or "#FFFFFF") into a SolidColorBrush object. What are you having trouble understanding?
May
27
comment Why is it an issue that it takes 2 digits to represent the number 10 in decimal?
2 digits makes 10 ambigious. Does 10 mean (1 * 16) + 0 or 10 * 1?
May
8
comment Whats the best way to handle errors in code?
The two examples do not do the same thing. The first example ignores the situations where a user does not exist or multiple users are found. The second example forces the caller to handle these situations or the program does not continue.
May
7
comment Optional dependencies in npm?
Just a thought but you could go with multiple packages. MyPackage-Core MyPackage-Db-Mongo MyPackage-Db-Redis etc... much they way people do bower modules that are meant to extend angularjs.
May
1
comment How to (or should I) have one assert per test with object comparisons?
I've always taken the single assert rule to mean assert one thing per test rather than only call assert once per test.
Apr
28
comment Would form keys reduce the amount of spam we receive?
It is hard to say how well this would or wouldn't work (really depends on the determination of the spammers); however, it is a known solution. This page has some suggestions and more information.
Apr
23
comment How can I handle Bots in a site that creates a database item every page
It was my comment which I removed once the OP updated his post. The question was if it was possible to simply create the basket when an item was added rather than when the user first hits the site.
Apr
21
comment What do these cocoonJS terms of use mean
IANAL but this the last sentence seems to limit what can be done with your IP solely for use in connection with the Services.
Apr
15
awarded  Pundit
Apr
10
comment What is needed write an interface to Microsoft Dynamics GP web services?
You may want to look at getting a MSDN subscription. If I recall correctly GP is available there. I haven't done the math but I imagine a MSDN subscription would be less than a GP license with the added bonus of access to the rest of Microsoft's software collection.
Apr
7
comment Types of unit tests based on usefulness
Can you give an example of the type of trivial logic test you're talking about?
Mar
24
comment Is a designer supposed to write CSS code?
@sorin A UX designer could be a graphic design, or a web designer, or neither, or both.
Mar
20
comment How can I deal with a slow API in PHP?
The traditional route has often been to create a cron job (or the equivalent scheduled task in the OS you're using) which executes a PHP script.
Mar
19
comment Is it a code smell if you are frequently creating an object just to call a method on it
@RobertHarvey I didn't mean to imply that static methods are universally untestable. My comment was meant to be taken as: If you think you may need to replace your SomeDataAdapter with a mocked version for testing one day, you probably shouldn't rewrite it as a static method. Your comment lead me to a very interesting read through a previous answer of yours that I feel is related to this question.
Mar
19
comment Is it a code smell if you are frequently creating an object just to call a method on it
The day after you refactor to static methods will be the day you want to run unit tests with a mocked version of your data adapter.
Mar
18
comment Building an organization-specific XML editor in HTML
ux.stackexchange.com may be of some interest to you.
Mar
13
comment How to prevent the vicious circle of testing via customer
This feels like an impossible question: "We don't have time to write tests ourselves. We don't want customers testing our software for us. We don't have the funds to have somebody else create the tests. What should we do?"
Mar
4
comment Why additional code and complexity when data model and interaction are simple is considered a disadvantage in MVC model
That statement is not claiming that simple interactions in MVC add additional complexity over complex interactions; it is claiming that simple interactions in MVC require more code than the same interactions without MVC. i.e. I can show a list of users with a bit of SQL and print but with MVC I would have to do a lot more.
Feb
21
comment How can I determine the level of talent a prospective programmer has?
Obligatory Fizz Buzz link.