1,640 reputation
927
bio website
location Kansas City, KS
age 28
visits member for 3 years, 10 months
seen Dec 17 at 22:41

Aug
21
comment How to make the members of my Data Access Layer object aware of their siblings
I hate to be cargo-cult, but DI solves a lot of these type of problems. Not only can you use the IoC container to control instance lifecycle, but you can configure different implementations per requester (the CustomerRepo can get a ReadonlyInvoiceRepo injected, for instance).
Mar
18
comment Protecting API Keys
Another really popular method is concatenating all the request parameters together plus the API key and SHAing it. On the other hand, this left Flickr open for a large security hole because they used MD5.
Feb
27
comment Able to read Code but struggling majorly to write it
@Brandon: then it's a debugging exercise nice and early.
Oct
25
comment Are we queueing and serializing properly?
@DanLyons: the only memory growth is in MSMQ. Nobody really talks about it, but it seems to be because of non-persistent messages which are all memory-mapped. Since we're serializing a lot of data, it does keep a substantial amount of memory allocated. The memory is (eventually) reclaimed as the messages are consumed and MSMQ's internal cleanup runs.
Oct
22
comment Is it a good practice to use smaller data types for variables to save memory?
Some people are worth enough money that you need to use a long to represent salary, if it's in USD. Moreso with other currencies. Sigh :(
Oct
18
comment How can a beginner develop an algorithm for this problem?
Your algorithm literally runs for the door at the end. That's so cool.
Oct
1
comment What are the pros and cons of having a life partner from the same field?
update to nobody but me: still going strong :)
Jan
30
comment I have data that sends in “bursts” of 100 records with a significant delay. How do I structure my classes for multithreading?
I hate when I write a big library to solve a lot of problems only to find its already built into .NET. +1
Dec
5
comment Extracting useful information from free text
@MichaelT: yes thats a valid range.
Dec
4
comment Extracting useful information from free text
@MichaelT: the variable part stays within the same character class, but both pieces might vary independently. It's not uncommon to see 100A-300L, or 100AA-200ZZ
Dec
4
comment Extracting useful information from free text
@sugaredlightning: can't guarantee that. They might want 1-100
Sep
5
comment Interfaces on an abstract class
This happens half the time. He always prefers to implement the interface on the base class, and I always prefer to implement it on the final concrete. The scenario you presented happens often and is part of the reason interfaces on the base bothers me.
Aug
16
comment Why is using System.out.println() so bad?
No. It's a quick test, who cares?
Jul
26
comment What's the name of this pattern involving multiple inputs and what to do based on an input?
This seems to match perfectly, and I'm glad to see it's not an antipattern. Plus, a fractional percentage decrease in runtime performance but an integer percentage increase in maintainability and productivity usually leads to better overall code written ... slow implementations of faster algorithms probably wins over fast implementations of slow algorithms.
Jul
9
comment Is an 'if password == XXXXXXX' enough for minimum security?
I don't see a problem storing the salt per-row, as long as its unique per row. Here's a hash: "fd84235a55bbfeb1585a3dd069d48127989c9753058b51b6ba2056fd6c5a0a91" (SHA256), here's the salt: "671254bdf7944f8fa88e6c9913b948ee". Think you can get the password? There's no rainbow table for that salt (even if you're given the salt), you're stuck brute-forcing it.
Jul
2
comment Is this a decent use-case for goto in C?
Aw that's a neat control structure.
Jun
22
comment General programming techniques to speed up coding time
@Konamiman: heh, yes I am. I couldn't tell if he meant "I am preparing, in C++, for a programming contest" or "I am preparing for a C++ programming contest". Oh well, chips lie where they may. Still, nothing beats a very fast RAD environment for programming competitions, where literally every second counts.
May
21
comment If your algorithm is correct, does it matter how long it took you to write it?
Starting your IDE and creating a blank project takes five minutes? If you don't already know Towers Of Hanoi, at least do them in the opposite order so the IDE is loading (from a VM over the internet apparently) while you're researching!
Apr
27
comment Queries about commercial products about using freewares libraries
That, or figure out how to call their library from an open-source "shim" in your application. This is done often with a little RPC module.
Apr
20
comment What naming convention for C# file that contains multiple classes?
@Felice: look at MSpec :)