« first day (14 days earlier)      last day (20 days later) » 
00:00 - 21:0021:00 - 00:00

9:00 PM
Math.pow
 
lol
duh
 
but that's a method, not an operator
there is no such operator in Java
C# has one?
 
nope. VB6 has one. got mixed-up here
hey I'm becoming tri-lingual :)
 
that's nice
I'm becoming... uuuh... (x+1)-lingual
 
lol
what's x?
 
9:03 PM
The number of languages I knew before
 
programming languages?
 
yes
Although I have used C# before
but not as much as I have done today
 
you'll really get hooked to LINQ when you start playing with a database :)
 
I've used Delphi (and with Delphi comes Pascal basically, same language mostly), PHP, JavaScript, ActionScript, C (not written, but read a lot), C++ (not much, but still), Java... Did I leave anything out? I think that's all (does SQL count?)
In what way is LINQ different from SQL regarding databases?
 
Oh.. basically take your SQL-mind, and throw it out the window.
 
9:06 PM
Oh yeah, a little bit Objective-C too...
lol
 
LINQify your mind
(you know you've failed if you liquify your mind instead)
 
ha
wtf? A total of 757 lines (including comments and whitespace)? How did this happen??
 
I remember fiddling with TurboPascal some 15 years ago, then with LOGOWriter. Played with BASIC 2.0 on a Commodore-64 (that's what started it all), then QBasic. VB4-5-6, VBA, C#. I can read VB.NET but the language just feels wrong, I'd rather mutilate myself with a paper envelope than write VB.NET code.
@SimonAndréForsberg is that a lot?
 
For the reviewer it, I think it is
Although as usual, my code supports some things that others don't
 
My resolver post will only include the actual resolver, I'll link to the Hello Java World post for the infrastructure stuff.
 
9:14 PM
ah, smart thinking
my code has the logic and the structure in the same classes though. Not entirely optimal generally, but this code is specifically written for solving. (One can always refactor later, right?)
 
9:32 PM
@SimonAndréForsberg as you've noticed, VS isn't very refactor-oriented. I guess you could, but without ReSharper it's a PITA :)
I think VS2012 has it better than 2010 though
 
Yeah, I noticed. A lot of things would need to be done manually
 
9:47 PM
Well, at least I won't have to split the question in two this time
@retailcoder Do you want me to provide a downloadable .zip for the source to help with the reviewing?
Damn, perhaps I should add this to github...
git isn't my second language though. I find it quite hard.
 
10:04 PM
@SimonAndréForsberg it's up to you, I don't mind reviewing lots of code in a language I'm familiar with actually :)
You can download TFS Express for VS2012 (works with Express edition too!), fully-integrated support with GitHub!
(like, right-click solution and you get a "Commit solution changes" menu)
 
OK then @retailcoder, suit yourself :)
I'll post the code as-is, but can upload a .zip to the web if you would like it
 
@SimonAndréForsberg ugh. removing the magic numbers is trickier than I anticipated. I don't have magic numbers per se, but SudokuGrid.toString() hard-codes the 9x9 scheme.
 
how does that method look like?
 
	public String toString() {
		final String newLine = System.lineSeparator();
		String result = "+===========+===========+===========+" + newLine;
		for (int row = 0; row < this.digits.length; row++) {
			result = result.concat("|");
			for (int col = 0; col < this.digits[row].length; col++) {
				result = result.concat(" " + this.digits[row][col].toString() + " |");
			}

			if ((row + 1) % REGION_SIZE == 0) {
				result = result.concat(newLine + "+===========+===========+===========+" + newLine);
 
10:18 PM
I need the method to be region-aware
 
I'll see if I can come up with something there
If not, at least I know something to comment on in the review :)
 
Your C# draws the grid with whatever digits you give it?
 
yeah, I haven't added any other fancy output besides pure numbers
 
well yeah that makes it quite a bit simpler eh!
 
Like this:
1234
4312
indeed it does :)
 
10:23 PM
in C# I could do var x = new String("=", 20); to get 20x "=". Is there a Java equivalent?
 
0
Q: SudokuSharp Solver with advanced features

Simon André ForsbergEven though it's the first time I'm writing something this "big", it feels like I know C# quite good. It's been nice to learn LINQ also and I am very impressed by the features, and perhaps I have overused it here (if it's possible to do that). SudokuFactory: Contains static methods to create so...

I believe there is, but I can't come up with what at the moment
Not as simple as the C# way, but I found this on SO: http://stackoverflow.com/questions/2306235/java-repeat-character

char[] exmarks = new char[aantal];
Arrays.fill(exmarks, '!');
String exmarksString = new String(exmarks);
 
1
Q: SudokuSharp Solver with advanced features

Simon André ForsbergEven though it's the first time I'm writing something this "big", it feels like I know C# quite good. It's been nice to learn LINQ also and I am very impressed by the features, and perhaps I have overused it here (if it's possible to do that). SudokuFactory: Contains static methods to create so...

 
@StackExchange ... Don't you ever learn?
2
 
I don't want to get "corrupted" just yet, I barely skimmed over your code (got a couple observations and suggestions already) - I'll post a review when I get my puzzle solved. And you're freakin' nuts - solving a Sudoku is too easy for Ninja Forsberg, you had to make it solve a Samurai Sudoku!
 
Of course I had to :)
Solving a Samurai Sudoku is not much different from solving any other Sudoku. It's just a matter of initializing different rules.
And don't forget the Nonomino! (tasty name by the way)
 
10:33 PM
Yeah, when your code has the concepts nicely defined :)
 
Doesn't _maxValue = copy._maxValue; give you an error? _maxValue is private...
(@SimonAndréForsberg SudokuBoard constructor) ^^
 
@retailcoder It's used within the same class. No problem there
Same thing can be done in Java
 
I... just learned something.
 
just because a field is private doesn't mean that other objects can't access it, only other classes
Yay, I knew something about C# that @retailcoder didn't :)
 
10:40 PM
I thought private meant "only for this instance"
 
nope, it's "only for this class"
 
Hackish though
 
I'd just expose a get-only property with a private or protected setter.
Accessing another instance's private fields sounds like breaking encapsulation to me.
@SimonAndréForsberg the box method should be called Box.
2
 
@retailcoder Lol, yes yes... I know :)
(Did you read the entire text of the question at the top?) ;)
 
10:49 PM
@SimonAndréForsberg Yes, that's why I'm saying box should be called Box :)
 
Why so much static? My hair is sticking up!
(gotta go, back in < 1 hour)
 
Because I didn't need an instance of an object for it. But if you know any reasons for why they should not be static, please tell me!
Gratulations, @StackExchange bot, you're now a meme:
6
A: Call of Duty - We're on a mission

retailcoderSome "memes"... A few expressions have come up recently, thought I'd share them here (feel free to add, this is CW!) Running out of ammo: when you have exhausted all 40 votes for the day. Head shot: when you're out of ammo and post a target in chat, and then someone puts in a vote for you. Wak...

 
>>>TESTABILITY<<<
2
(or I'm just allergic to static stuff)
 
Testability might actually be a good point
To be able to mock the thing, or extend and override, etc..
I've never used mocking though, but I know that it exists
 
11:13 PM
Six questions has been asked so far for this week's Sudoku Challenge, four of them has been answered so far
I've just helped @rolfl to be rep-maxed today as well.
It feels strange to actually have submitted a C# question...
 
11:37 PM
@SimonAndréForsberg - not rep-maxed .... 1 rep short!
199 for the day, and 23 minutes left.
 
I'm going through the unanswered list again, and I found this question (which is also asking about correctness). Is this C#, or some other language?
0
Q: Abstract repository for entity framwork

Shahrooz Jefri ㇱI write abstract repository using System; using System.Collections.Generic; using System.Data; using System.Data.Entity; using System.Linq; using System.Linq.Expressions; namespace Framework.DataLayer { public class Context<T> : IContext<T> where T : class { private readonly Db...

 
00:00 - 21:0021:00 - 00:00

« first day (14 days earlier)      last day (20 days later) »