3:00 PM
I am going to write that program in C# I think, once I package up this code at work for another Jurisdiction

3:10 PM
@Mat'sMug are you around?

@Vogel612 The UI of the field doesn't fresh on action... only the hand one does currently

It's quiet today. Must be lots of monking going on.

@Corbin Ready to continue semantic talk?

@skiwi soo... anything I can do to assert that the card did actually arive at the field?

Nope, not until the eventbus integration is finished for other classes
I have no clue how pull requests work... Glad you figured at least out how to submit one

3:21 PM
@skiwi other than that I also have no clue...
I just compared across forks, and took the master for both...
maybe I don't have to merge the friggin .gitignore everytime I pull from your repo now ;)

Did you ensure that your repo was up to date with mine?
Because I see you have 31 commits there
Only two changed files though

these are all yours. but they are probably counted since I forked...
only those 2 marked are mine..

I was just wondering why it counts them again... But maybe it's normal?
Your fork has to have som ekind of startin gpoint either way

dammit...
somethings wrong with the pom.xml..
check the testFX dependency in the file view...
I just changed the scope, but it gave it a whole duplicate node...

@Malachi getting pings, but busy at my future job right now, knowledge transfer FTW :)

3:32 PM
Strange there

check that commenting functionality ;)

anyone on this site want to check out a meta question?
@Mat'sMug I figured it out, I will leave you to your new Job!!!
0

Do antistatic bags have conductive interior, exterior or both? is the Question with the answer that I flagged. I came upon this question by way of a link from a comment on an answer to a question on the Superuser site. I flagged this answer because it doesn't answer the question(to any degree)...

Electrical Engineering

Nice
How hard woudl it be to makee an extr acommit that fixes those small issues?

I'd probably just edit in browser...

1

I've recently made a calculator using Java and Swing. I'm okay with the results but I'm curious what are the mayor flaws I've made (assuming there are, because it is my first program making GUI). I can't think of a fancy way for not duplicating code in the function action listeners classes. Whic...

1

How would you name this function (I gave in a name pipe in the example) which constructs combines a chain of functions with a single attribute into a single callable: # pseudocode function pipe (chain_of_functions) { return function(value) { for( fun in chain_of_functions ) { ...

0

Exercise 5-4. Write the function strend(s,t), which returns 1 if the string t occurs at the end of the string s, and zero otherwise. #include <stdio.h> int str_end(const char *, const char*); int main(void) { char *s1 = "Man is a rope stretched over an abyss."; char *s2 = "an abyss."; ...

3:35 PM
this is just a duplicated node in an xml..

What about the /target/ vs /target?

the last slash shows better, that it's a folder...

I think the postfix / is neccessary in order to recognize it as a folder, I could be wrong there though

so I'd opt forthat after rereading ;)
I doubt it's necessary, but definitely easier to read for users...

Less confusing :)
Can you simply commit against a pull request, or do you need to make a whole new one then?

3:40 PM
@CaptainObvious That is some weird indentation style !

I am on commiting against the pull-request I think ;)

@Marc-Andre Indeed!

@Marc-Andre But, I sort of like it ....

For simple code it looks interesting, but ti relies on the fact that the declaration+assignment and uses are always related

0

Here is a login system I am working on, I just want an opinion on it and whether I am going in the right direction or just completely missing something. I realize time is money so I appreciate any help you fine folks here at SE can provide. The main thing I would like to know is am i initializin...

3:42 PM
@skiwi Which for swing frame initiailization, it often is.

@rolfl True... But still, it's a style you cannot apply on your whole project, which bugs me a bit

Yeah, I am not suggesting people do it, but I can see why it was done.

I know, I also had an... interesting feeling when I first read it ;)

OK, my own question has to wait. That Swing calculator is MINE!

Hmm... Google seemed to have deprecatd Dalvik in favor of ART, and next week Google I/O conference, interesting
Are there any odds for full Java 8 support? Though problem still is that the mass of people cannot use your apps in the coming year
And... I learned something new
A Java processor is the implementation of the Java Virtual Machine (JVM) in hardware. In other words the bytecodes that make up the instruction set of the abstract machine become the instruction set of a concrete machine. Implementations Up to now the following Java processors are available: *picoJava was the first attempt by Sun Microsystems to build a Java processor *[http://www.ajile.com/index.php?option=com_content&view=article&id=2&Itemid=6 aJ102] and [http://www.ajile.com/index.php?option=com_content&view=article&id=3&Itemid=7 aJ200] from [http://www.ajile.com aJile Systems, Inc.]...
I was really tempted for a moment to comment about someone using "JAVA" in a Dutch forum, but it may be better for both of us to just pretend nothing happened
@Vogel612 I pressed the button.
Hoping it still works

3:58 PM
> Crunching the latest data, just for you. Hang tight…
wat...

Where's that?

Contributors.

Ah

@skiwi btw If I were to refactor out the "Commands", where would you want them?...
I was thinking of a Map<String, Callable> commands with the invocation as String and the stuff to do as the callable...

@skiwi What's ART?

4:06 PM
0

A handful of people seem to have formed the opinion that an example project is exempt from this topicality constraint: Is it actual code from a project rather than pseudo-code or example code? The FAQ clearly states example code is off-topic, and this notion of example projects being exempt...

@SimonAndréForsberg Alternative to the Dalvik compiler, you should google it ;)
@Vogel612 Where exactly?
(I haven't touched the code for 2-3 weeks)

In your ConsoleController...

I'm somewhat proud of my final product in this answer:
1

A few notes: Analyzing your code, I see a simple bug that isn't accounted for. Consider the following case: char *s1 = "Man is a rope stretched over an abyss."; char *s2 = "an abyss..c9f0c50bc2e417b078e3b0bf82d5386d418cfba4"; Your method still returns 1 even though it clearly shouldn't, bec...

@Vogel612 Ah yes, that point is definately up for refactoring...
Even I don't like how that is done.

And if any of you notice the SHA1 I appended to that string, it reads "clearlyabug" when decrypted.

4:11 PM
By the way, @syb0rg, have you an answer for that OpenMP question asked yesterday?

@Jamal I don't, I'm haven't used OpenMP that much yet. I looked over it but couldn't find anything to really optimise that much, or even comment on (other than what you said). I was thinking about saying something along the lines of the toilet analogy though.

I don't know anything about it, either. Just going over the C-specific stuff as usual. Makes me wish William Morris was still around.

4:26 PM
0

I have a shell script to configure Synaptic touchpad settings at login. Background You configure the touchpad with the synclient command. Its usage is synclient [-lV?] [var1=value1 [var2=value2] ...] For example: synclient PalmDetect=1 — to set a single setting synclient PalmDetect=1 Pa...

@skiwi It's nice to see that you're back on your TCG again. Or perhaps it's only @Vogel612 who's at it now?

@SimonAndréForsberg that would be me..
still I don't like to make design choices, like the one currently on the plan...
@skiwi broke stuff, you know..

Hehe, you should help me instead, I've made my design choices already :)
(Although there's probably more of them to make later on...)

0

I am not sure if I am approaching this task the correct way. I have a view model with multiple string properties. I pass the model through an interface to a service class that contains a void to repopulate the user input with my desired format. using System.Globalization; using System.Text.Reg...

4:42 PM
didn't realize that it auto posts for you if you are the final vote on a delete.

@SimonAndréForsberg Well technically, I need to do stuff as well, but @Vogel612 is doing over 90% of it

Body is limited to 30000 characters; you entered 30014.
10
You gotta be kidding me!

That's a rather arbitrary limit

Obviously having 30014 characters will turn CodeReview into utter chaos, while with 30000 characters, nothing will happen.

@rolfl and @DaggNabbit You might want to look at this question (or not look at, if you want to figure it out yourselves)
0

Calculating probabilities in Minesweeper might sound like an easy task, but I've seen so many probability calculators that's either incorrect, horribly slow, or with ugly code (or all of them) so I have to share my code for this. This code is used within my Minesweeper Flags online game by the A...

4:55 PM
soooo @skiwi where do you want the validation of your Actions? On Instantiation or on execution?

@Vogel612 Hang on, ima give a response on the newest issue you created, but I gotta be afk now

And oh, moderators! You have an excessively-long flag to take care of :)
3

The issue is rather annoying... as one might be a bug in the GUI, while the other is a feature

@SimonAndréForsberg It's going to take a few reviewers to give that justice. Looks like a cool project. I was wondering when it would show up as a question.

1

Calculating probabilities in Minesweeper might sound like an easy task, but I've seen so many probability calculators that's either incorrect, horribly slow, or with ugly code (or all of them) so I have to share my code for this. This code is used within my Minesweeper Flags online game by the A...

4:59 PM
If @Jamal wants to Jamalize that question, he's going to have a hard time :)
@ckuhn203 Thanks. It is a cool project. I have not seen any other algorithm for this out there so far that is as efficient as mine, so I hope it will bring a lot of attention.

I'm looking forward to looking at it.
I have an illness. I like to read java.

@ckuhn203: It's not an illness. Masochism is merely a personal preference.

@SimonAndréForsberg Challenge Accepted
2

lol

@ckuhn203 I starred that first and then I realized, "Oh wait, I like Java!"
It would be interesting to see if there would be any performance gain by writing that code in C++ instead..

5:03 PM
I like it's portability.
It's just a terribly abused language.
I am decidedly not in favor of the "Everyone should learn to code" craze.

@ckuhn203 C++ or Java? (Or both?)

I think all of them get abused. Some are just more popular than others.

Done

And.. Jamalized.
I don't know if I've mentioned it, but I'm glad you guys are around. It makes the day more fun.
11

@Jamal Whoa, you managed to remove 10 characters. Now I can write 10 new ones!
2
@ckuhn203 Aaaand pinned!

5:07 PM
@SimonAndréForsberg By the way, remind me to kill you later for keeping tabs in your code just to free up characters.

@ckuhn203 Somehow PHP comes to my mind, probably one of the most abused languages ever...

@SimonAndréForsberg Right next to anything visual basic, yes.

@Jamal Don't kill me, kill my review-preparer and the formatting in Eclipse! I always use tabs in my code. And remind me to kill you for almost starting up the old tabs-vs-spaces war. ;)

javascript is pretty heavily abused, too

Soooooo..... Do I try to use extended properties to document the database, or do I just keep it in an excel document? Which one is going to actually get maintained?

5:10 PM
@SimonAndréForsberg Hey! I like war!
(code-related wars, that is)

@ckuhn203 documentation maintenance is an oxymoron

More like a myth @DanLyons.

If I had a dollar for every piece of documentation which was out of date or just plain wrong, I could retire :)
3

I have a process that is under constant dev. It's impossible to keep up with the docs. I end up rewriting it from scratch every other year. It's getting old.

5:25 PM
@DanLyons - I agree. I've just spent about 7 hours getting an android sample cloud messaging app downloaded, installed, tested to find out it doesn't work right.
And has deprecated code.

@SimonAndréForsberg THis uber large bunch of formulas screams for being math-jaxed. Now if there weren't the character-limit...

@Vogel612 lol, well... now that Jamal has removed 10 characters there's room for two jaxizations. Assuming the formulas themselves don't need to be modified.

@SimonAndréForsberg I personally value consistency over "it looks nice"

@SimonAndréForsberg you never answered whether you think "code created solely for the purpose of illustrating a question" is an accurate definition of "example code." To me, it feels like a much more natural definition that "code lacking context." What are your thoughts on that?
possibly replacing "question" with "concept" or "pattern" or similar

@DaggNabbit I'm still think about that one.
For now I think I'll say: Perhaps. For me, code created solely for the purpose of illustrating a question can still be on-topic. Such as some A vs. B questions we've had in the past.

5:37 PM
Back now to check some stuff...

@DaggNabbit I would love to see an answer from you here, perhaps you can find other example code/project questions as well?

@Vogel612 I'm doubting about the issue, I'll explain it in some short words
I have pulled all checks that can be done as early as possible up front, and ones that are not possible, are done in the other methods
Hence I can check the targetMonsterIndex in AttackMonsterAction, but not the monsterIndex in the constructor
the console GUI has a 'bug' where it doesn't check it
So everything is intended, but I would imagine it not to be correct

I agree with Simon @DaggNabbit. We've weighed in with our arguments. I'd like to see your answer to that question too.

@SimonAndréForsberg I'm not going to answer that because it would just get downvoted into oblivion. The only people who seem to be interested in the conversation other than myself seem to be predisposed to the idea that "example code" has a very specific and non-intuitive meaning.

I want you to convince me.

5:41 PM
^

@DaggNabbit lemme jump in here... Yes I have, but it's not like that Idea can never be changed. Afterall we are all dynamic and can learn...

Exactly. Convince me. What are your arguments? Right now the question has very few examples and too much agreement. To come to any kind of conclusion, I think we need to here more opinions.
2

@skiwi you'd have a validation in about 3or 4 different places then....

i would only suggest that we either use a natural, common-sense definition for example code, like the one I proposed, or ditch the "example code" wording in the FAQ and say what we really mean instead

@DaggNabbit sooo what exactly do we mean?
2

5:44 PM
"code lacking context," and that alone, apparently

0

The code is the view part of my bookmarker - project for managing bookmarks by categories. It uses Python 3.4/Django 1.6. I have also included models.py for reference. The code does the following Providing relevant autocomplete JSON data Providing details of categories/bookmarks (both are DB m...

soo you'd rather have a fully contextualized example with variable names like foo, fooBar and FooBazClass ??

no
i would rather not have code which only exists to illustrate a concept, and is not (part of) a useful project outside of that

you misunderstood me.. the code is part of a project. but OP went through the hassle to replace all names with meaningless gibberish.

yes, that happens because the code is someone else's "intellectual property"

5:47 PM
@200_success: Has your answer been invalidated here?

it sucks that it happens but it's unavoidable sometimes, and it does get reviewed

@DaggNabbit but as soon as he posts it to SE network it's under CC-BY-SA License...
ah okay, I think I get your point...

...which is why he obfuscates it, so it doesn't infringe on his employer's copyright
yeah :)

@DaggNabbit Here's a search for questions which might be of interest: codereview.stackexchange.com/search?q=example+is%3Aquestion

different question: How do we handle one- or two-line questions then??

5:49 PM
if they are reviewable and not excluded by some clause in /help/on-topic, review them

@SimonAndréForsberg that's 2.7k results. roundabout a seventh of overall questions..

@Vogel612 I agree with your concerns, but it is a point where a principel and easy of use clash

well we are currently arguing on point 3 aren't we??

yeah, just #3

@skiwi then define a policy. I will adjust.

5:52 PM
@Vogel612 Indeed it is. Which is why treating example projects as off-topic would harm the site a lot IMO. What good would it do to treat probably most of those projects as off-topic?

@Jamal Yes, on indentation and patch_all(). I'll roll back.

@DaggNabbit Why the quantifier? The FAQ does not quantify the word "project". Who's to decide what is useful? That's awful ambiguous.

@Vogel612 I will need to think about that, because I don't know either

If you want to go down that road, now we have to have the conversation about what is a real project.

@skiwi take your time. Would be nice if you could write it down in your Readme or somewhere in the github docs..
@ckuhn203 well then I can also throw in all these training implementations??

5:56 PM
What training implementations?

Swing Calculator.
we've got almost 1k of "Calculator" questions...

swing calculator is a calculator
a calculator is a tool

stop is something totally different.

a tool is not something created solely for the purpose of illustrating a concept
different?
a calculator is not a tool?

But.... every computer everywhere has a calculator built in. Clearly, rolling your own is not a real project, right???
See what I"m getting at here?

6:02 PM
no
i don't
to me, a natural definition for "example code" (CR aside) would be something like, "code which exists solely to illustrate a concept"

A lot of people coming here are enthusiast who are learning something. Whether it be a language or a concept in a language. ALL of those questions become off topic the second we start judging how "real" a project is.
3

i don't see how a calculator would fall under that description

I think this C question has hit the hot topic list: codereview.stackexchange.com/q/54722/27623

all of what questions? show me some examples of questions we want here that fall under the definition I just gave

Ok, explain to me how swing calclulator is any more of a "real" project than Alfred

6:05 PM
i never said anything about "real"
again, "code which exists solely to illustrate a concept"

2 days ago, by Dagg Nabbit
@ckuhn203 that looks like real code from a real project to you?

ok, now I'm refining my definition
i thought the FAQ said "real code" when I wrote that, but I realized later that it doesn't

oh,while we're at it, shouldn't we tag all "Calculator" questions with ??

probably
but that's a separate issue

gimme a sec, I'll just create me a nudge..

6:07 PM
@Vogel612 Which is why I'm in favor nowadays of burning that tag... but as Dagg says, that's a separate issue.

@ckuhn203 Absolutely true. I'm trying to learn PHP/Android for a messaging app, so I came to review things others have posted.

@Vogel612 Probably. But there is the question of burning it.

The fact that there are no GCM questions/examples lead me to believe that it's fairly simple and it's a PEBCAK issue.

look, forget about "real project," the important distinction is "project (code) which exists only to illustrate some concept" vs project (code) that exists for some other reason.

@SimonAndréForsberg - looks like an elegant solution

6:10 PM
I'm listening. Go on.

am I leaving something out?
all I'm saying is "code which exists only to illustrate some concept" is the most natural, common-sense definition for "example code" that I can think of
can you think of something more fitting?

-2

I am learning java and now making a game Guess My Number, where computer choses a random number which is declared as int rNumber for random number. i have created 2 buttons, guess and exit, when player enters a number in texfield next to label and click on GUESS button then it displa...

That's a fair argument.

@Dagg - still catching up on the debate (been a way, and only paying attention with a half-eye at the moment.).

point being, if we mean something other than a natural, common-sense interpretation of "example code," then we should not write "example code" in the FAQ, we should write whatever we really mean

6:13 PM
I still think, that this is not enough..

@rolfl Thanks! You cheated!

Simon, I was heading in a similar direction
My instincts were off, but, the first kick I had at the problem proved that, so I started reducing the ways to solve it.

Agreed @DaggNabbit. I don't feel like we do mean the common usage, that's why I wrote that answer on meta.

How do we then exclude code,that was modified before asking?
Code like an SSCCE?

@Simon Your solution is still extremely time-complexity problematic, it probably has not changed the technical complexity at all.

6:14 PM
Good question^^
Laggg

@CaptainObvious GuessButtonHandler has an infinite loop

@Vogel612 I honestly don't think we should, sometimes you want to ask a question about code you wrote at work and you have to obfuscate it a bit so you're not infringing on someone's IP
I've seen lots of examples of that happening here and nobody bats an eye

Question for all: Is it a faux pas to post once complete code that has decayed that you don't understand from a downloaded web source and ask why?

@JohnP the code must be your own

6:17 PM
@rolfl I know, the complexity is O(2^n) I believe. However, in my approach n is only the number of shared fields, which is what makes it quite fast compared to other algorithms.

Anyone knows a good resource explaining and implementing MVC with PHP? Not frameworks themselves which uses MVC because by looking at documentation implementation details are supplied

@DaggNabbit - Well, I've modified it trying to fix it but I suspect that won't count. :p

just say you wrote it :p

Too late now.
At least for you three...four..seven. ish.
3

I've seen that sort of thing slide sometimes, but not often

6:18 PM
And I know the first comment will be "Why aren't you using mysqli_*?

@JohnP that's something for Code Understanding

@JohnP Then use mysqli_*!!! Or PDO. Please. We don't want to write that old comment again about using mysql_* is deprecated...

@Vogel612 - Thanks! Followed it, hope it gets off the ground. My model building one has stagnated badly.
@SimonAndréForsberg - Working on it. I haven't looked at PHP in so long that I didn't know it was deprecated, other than seeing comments all over doing SO searches.

Jun 3 at 12:38, by Vogel612
could it be that nobody really knows how MVC works??

@JohnP Well, at least you did the SO searches!
@Vogel612 Just like Programmers... (sorry, old joke)

6:21 PM
PING

@SimonAndréForsberg - Yeah, I'm working on a droid message application, so I found an example with both the droid app code and the php side, and it works...*almost*

dammit I need to fix this somewhen..

I haven't touched PHP in 4-5 years and I've never worked with android, or much with java.

@JohnP I haven't touched PHP since I started working with Java. (And I've worked with Android too)

@SimonAndréForsberg - I've always been in Clipper and lately C# as we modernize/migrate. It's a dead simple app, just my time vs. learning curve are holding me back atm.

6:34 PM
I can't debate any more today @DaggNabbit, but that meta could really use an opposing viewpoint and you're obviously the guy to do it. I think you should consider it.
11

This is related to Why is hypothetical example code off-topic for Code Review? Which is related to On-Topic question #3: Is it actual code from a project rather than pseudo-code or example code? It seems that we're not quite consistent in our treatment of "example code", which is what this...

I would, but it would just get downvoted a lot, making it appear to be an invalid argument
But yeah, I'm gonna go dig some holes in the yard i think
i wonder if it's too late to plant tomatoes

It's never too late for gardening. =)

lol tell me about it, my yard looks different every week xD

0

My application has a fairly important query that is used in a lot of places. Unfortunately it takes about 14 seconds to run, so I'd like to find a way of possibly improving it. The application receives incidents (right now there's about 70,000 total incidents, and about 16,000 incidents in this...

0

I am using var in my code to initialize and define all of the functions. Here is the code, public void MainWindow() { var name = "Afzaal Ahmad Zeeshan"; var age = 18; Console.Write("My name is: " + name + "\n"); Console.Write("My age is: " + age); } But I was told by my teacher th...

6:54 PM
blimen heck. Everytime I try and put code after list items I mess up. Does anyone point me out the trick to doing this?

@dreza Two (I think) extra spaces at the start of the line?

ummm, tried that didn't seem to work. Do you mean on the same line as my first bit of code?

Hello, all

@dreza It's four extra spaces on the first line.

@NiallC. Yes! Excellant. Thanks

7:37 PM
0

I am posting this question for input on comparisons between other sieving methods and opinions on what I have discovered. I believe this might be the fastest (singular, non-threaded) array implementation of prime sieving to date, correct me if I am wrong. My rudimentary benchmark tests stand as ...

0

This is being used now, seems decent to me but I'm curious. if (m=s.match(/^\s*(https?:\/\/[^\s<>"]+)\.(bmp|png|webp|gif|jpg|jpeg|svg)\s*$/)) { // example s: http://mustachify.me/?src=http://www.someImage.jpg return '<img src="'+m[1]+'.'+m[2]+'">'; } if (m=s.match(... @CaptainObvious now someone needs to math-jax the whole thing again:( @Vogel612 again? I did that with the deleted version already... replaced all the backticks with \$

@Vogel612 If you have the link to the old question, I can copy it from the old to the new, since I can see removed posts

@CaptainObvious You've gotta be kidding me. The formatting is still sloppy?

7:46 PM
@SimonAndréForsberg I closed the tab ages ago...
and I can't find deleted posts the "usual way"...
nvm...
aaaaand it's done ;)

hey guys, stupid sql question. if I have 10 rows, which have A, A, B, B, C, C, C, D, E, F, how do I select just D, E and F?
I google unique and distinct but I dont want A, B, or C in my result
just D, E and F since they only appear once
what keyword am i looking for

@n00b SELECT ... FROM ... WHERE ?

or do i have to do some group trickery?
where count(row) == 1?
count(column) i mean
sorry, i see where you got confused, it doesnt just have D, E and F. theres a million possible values, so I need to just be able to select all rows which have a unique value (only 1 row of that value)

Oh, yes, you have to use some grouping. HAVING COUNT something == 1

Hi @n00b.

7:54 PM
0

I am working on a ground-up rebuild for an app that has a relatively simple purpose. Users can view/favorite entities that are backed by a RESTful API. I own both the client code as well as the API. For this rebuild, I wanted to refactor the networking code out of my view controllers and hopefull...

Guys....I'm sorry for my sloppy code formatting and I appreciate all your help....
I learned a convention style in school, but unfortunately it takes up WAY too much space on the web.
Thank you :)

This might help with the math formatting @AlexLieberman.
561

To see how any of the formulas were made in any question or answer, including this one, use the "edit" link to view the complete source. To quickly see the source of a single expression, right-click on it and choose "Show Math As > TeX Commands". (Note that in some browsers, such as Firefox, th...

0

Inversion Count for an array indicates – how far (or close) the array is from being sorted. If array is already sorted then inversion count is 0. If array is sorted in reverse order that inversion count is the maximum. Formally speaking, two elements a[i] and a[j] form an inversion if a[i] > a[j...

Thanks @ckuhn203 - I'm new here and I'm also fairly new to coding and computing.

It's ok. We're all new at something.
I've not been around here that long myself.
Someone passed me that link, now I pass it on to you. =)

8:04 PM
I'll try to fix my code when I get the chance to something web-readable and consistent. Is anyone finding it at least somewhat interesting and novel?

And I apologize if I sounded a little too arrogant. It wasn't entirely apparent to me that you were a beginner. You could tag your question(s) as .

Hey - no I understand you - no arrogance perceived. I've been kind of spaz with deleting and moving around, trying to figure out things.

0

Someone suggested me to post it in Code Review so here I am. I can't really find a satisfying solution for that problem. I have a n-layers application : UI Presentation (Domain Model used as DTO, ViewModels are then presented) Business Layer (Domain Model) Repository and DAL (Data Model) My ...

@CaptainObvious Nope, still off-topic.

@AlexLieberman I don't know Java, but I'm interested in the math.

8:13 PM
I'm working on cleaner code with proper variable names
But its school style - I dont want to flood the window, but when I'm done if I share will it make a small scrollable text box if I share here.
I can attempt to write it in C#. I just started C# this summer.
If you understand C# then maybe you'll get it.
I mean psuedo code is pretty descriptive I feel - basically primes can never be even (factor of two) or a factor of any other prime. Six is the smallest number that is a factor of the smallest two primes - and as such is a perfect tool to count by one above and one below.
Can I share word-doc tables here?

No no. That's all I mean. I can understand it well enough. I just wouldn't put a review up on a Java question.
I'm a bit of a math geek, so I'm interested in the algorithm.

Oh ok
Yeah Im trying to figure out time complexity
My professor said he'd try to publish it within a CSIS technical report
School-wide it seems.
But I need to include time complexity in that report
and I have no freakin clue lol

8:31 PM
Anyone there? Quick review of my code formatting?

@AlexLieberman Better, but a one-space indent is visually very difficult to pick out (2 is about the minimum and I usually use 4). Also, the advice that "Bobby" already gave about putting in braces even in the case of a single if is sound.

@AlexLieberman I don't like the code formatting very well. You seem to vary between 1- and 2-space indentation, and don't always have your closing braces aligned with the opening. Makes matching them up pretty difficult.

Also if you format it offline and paste back into place, make sure that your editor uses only spaces and NOT tab characters.

Hrm lemme see.
i use notepad lol

8:46 PM
 while (!isPrime[b])
{b+=2;}
Don't do that ^^^
4

yeah ill change that

@Edward I was going to agree, then I realized you were only talking about the formatting, not about using Java. :-)

@AlexLieberman Don't do that either! lol There's lots of good IDEs out there.

Or was I? :)

I should lol

8:49 PM
@Edward Enquiring Shallow minds want to know!
2

@JerryCoffin I'm out of stars, so you get pinged instead.

@JerryCoffin I was mostly talking about the formatting, but using any of Java, notepad or Windows all fall into the "don't do that" category in my bigoted, er, enlightened view.
2

@Edward Here I was kind of hoping for that corner office with the nice windows one of these years.

You can have that corner office. As long as you settle for cardboard walls and waxed paper windows.

@Edward He has that already since he uses C++
(where everyone is boss, the walls are thin, and the view is opaque)

8:54 PM
@Edward Doubt it. Darned cubicles are made of something you can't stick pins into, and tape doesn't stick worth a darn either.

@JerryCoffin Well fancy you! You're indoors?!
2

^^TS

@Edward ...and running water too!

@JerryCoffin Well we don't have all that, but they sometimes serve 'possum gizzards in the cafeteria.