« first day (544 days earlier)      last day (3466 days later) » 
00:00 - 13:0013:00 - 00:00

12:04 AM
Oct 26 at 23:56, by rolfl
RELOAD!
 
I'd reject it for the title alone
 
@JeroenVannevel it defaulted back to the OP's awful title (that I had improved) because his edit was more significant
But... that being besides the point... I can't reject his edit, not enough rep.
 
Man. I moved a movie across the network and at 99% it decided to restart
he touched code, that's a nono
formatting is of importance on CR
 
Can you overturn it?
 
12:19 AM
oh
aight, time to put my trusted user stuff to use
 
Thank you Mr. Vannevel!
 
Hmmm ... hey all ;-)
@Jeroen - @Phrancis .... generally changes to the code are fine until there's an answer.... right?
 
@rolfl but then he missed out on people telling him how crappy his formatting is
 
If he improves it himself, then that is also fine though.
 
ah, but it was a suggested edit by someone else
 
12:26 AM
Oh, OK.
Looking again ;-)
Never mind.... back in my hole.
nothing to see here, move along
BANANAS!
where, where? Dinner time ;-)
 
I'm onto you
3
 
Patience... soon it'll take 2K rep for these edits to go through
 
@JeroenVannevel Cool documentation, bro.
 
I'm out, Dawn of the Planet of the Apes! (I swear it's coincidence)
 
12:31 AM
sayonara, muchachos
 
Roasted Pumpkin seeds.
That is all.
 
12:46 AM
Anybody notice that we now get auto complete pings on mobile?
 
0
Q: Why IE and Firefox browser can't fit my div boxes in web page?

Jabir Al FatahI have 6 div boxes with a 50% background picture and text in it. I have designed it so that first 3 boxes will stay next to each other in same row (or line). And another 3 boxes will stay in another row (below the first row with 3 boxes)next to each other. Now it works fine in Chrome and Opera ...

 
@CaptainObvious Ouch.
 
1:07 AM
anyone got good references for learning about large scale system design?
 
1:51 AM
@mjolka NetflixOSS
 
@rolfl thank you :)
 
2:08 AM
Nothing, resolved now.
Hear the joke about the speechless mime?
 
2:29 AM
Aren't all mimes speechless?
 
2:41 AM
I heard (read?) one or two people on here when I posted my last question, asking if database/schema design was on-topic for CR... I just happened to stumble upon this post on DBA...
8
A: Is question about improving database design on topic?

ConcernedOfTunbridgeWells'How do I improve this schema?' is likely to be too broad and subjective to make a really good question. If you have specific issues then you can certainly ask questions about those. In general, 'I don't know where to start' is not acceptable on SE sites, as you are expected to have at least do...

Take it or leave it, from my experience I have had excellent and in-depth database design answers on CR.
(as opposed to off-topic on DBA for same question)
 
 
2 hours later…
4:56 AM
Can't find any solution for it
 
 
1 hour later…
6:03 AM
0
Q: windows bat file combine codes used twice in bat file to only use once

Dynamite MediaSo from snippets around the web i was able to put together this Bat file to check for a date and compare 2 different files This works below but i want to clean it up so it can be much lighter and faster and MUCH less code as you can see it uses the same code to check date with hour and number, ...

 
6:41 AM
0
Q: Can this be implemented in a better way performance wise?

Rohit KatyalQImplement a method to perform basic string compression using the counts of repeated characters. For example, the string aabcccccaaa would become a2blc5a3. If the "compressed" string would not become smaller than the original string, your method should return the original string? package string;...

 
7:05 AM
0
Q: Extracts logic applied in a sequence of integers

Stéphane BebroneTotal newbie in haskell here, I've done it in C# before but thought that a functional language would be a good fit for this kind of thing. From this ascending list of integers: [100,103,106,112,118,121] I had to calculate the difference between two consecutive numbers and group them while the ...

0
Q: Fetch plist file in Objective-C

MoodyI have a plist file with many nested dictionaries inside of it, and I wanna fetch them all to my code. Isn't there any more efficient way to do that than nested for-loops? NSArray * keys = [plistDictionary allKeys]; for (NSString * key in keys) { // Level 1 NSLog(@"%@", key ); BOOL ...

0
Q: Possible re factoring in Binary tree python implementation

vivekpoddarclass BinaryTree(object): def __init__(self, rootObj): self.key = rootObj self.leftChild = None self.rightChild = None def insertLeftChild(self, newNode): if self.leftChild == None: self.leftChild = BinaryTree(newNode) else: ...

 
8:09 AM
0
Q: Is the strategy to eliminate code duplication correct

GhostI have two forms in my HTML page. Both share a set of input elements (not a part of any of the forms, but rather residing separately). Besides that, the forms have their own input elements as well. Each of them also have their own notification div. The process of POST request for both the forms ...

 
8:47 AM
So I'm reading this question
26
Q: How to deal with a team member consistently showing up late

rotardFor a long time I was the only developer at my company. Last year, we hired two more entry level devs. I have no management experience or training and very few managerial duties, but by virtue of my seniority I am in a position of some authority and on paper they report to me. Point is, callin...

 
0
Q: TicTacToe in Haskell

wei2912-- Tic Tac Toe implementation in Haskell. module TicTacToe ( newGame, isWin, move ) where import Control.Lens import Data.List import Data.Maybe -- Size of the grid n :: Int n = 3 data Player = X | O deriving (Show, Read, Eq) type Marking = Maybe Player type Position = (Int, Int) ...

 
And half the comments are "if it has daily meetings, quit"
and I'm like "what the hell"
 
I dunno if this is common to programmers but to me, if the workday starts at 8, you're there at 8 and ready to work...
 
Yeah well screw that
 
O.o
 
8:51 AM
All you get is me sitting grumpy and sleepy behind a computer
and no work ends up being done until a couple hours later
 
I suppose I'm bred in a different environment :P
 
hmmh
 
0
Q: Grayscale bilinear patch extraction - SSE optimization

AldurDiscipleMy program makes an intensive use of small sub-images extracted using bilinear interpolation from larger grayscale images (some call this problem subpixel translation). I am using the following c++ function for this purpose: template<typename T> bool extract_patch_bilin(const cv::Point_<T>& pat...

 
Then again, I have and will stay to 9 PM if that will fix the problem
 
In my country, getting fired is kinda hard once you've been hired, but concistently showing up late, is one of the things you can be kicked for
On the other hand, we are reknown to be a very punctual people :P
 
8:56 AM
I come in before the daily meeting
 
"For our weekly meetings we agreed (by consensus) that whoever would be late without a good reason would have to pay 20 SEK (~2.15 EUR, ~2.75 USD) in a "late box", and that we would use this money for a pub evening as soon as there would be enough money. Alas, the latter never happened during the 4 years I was there, as after this rule, it became extremely rare for people to be late... " Like a swede XD
 
@Gemtastic *renowned
That said I agree with Pimgd...
If I didn't do some crazy ape-shit last night and pulled an all-nighter I don't show up before 9AM (when work starts)
 
To me meetings are sacred; you don't arrive late to those
 
I kinda understand that... but meh..
 
When your work-day begins as a programmer only affects you, the meetings affect everyone who needs to attend it if you're late
 
9:00 AM
true that.
 
I like flexible work-places though.
It's great if you can start pretty much whenever as long as you work your share and/or time
 
Still, what's wrong with daily meetings
 
nothing...
some people just don't like being "monitored and supervised" on a daily basis..
because then everyone would realize: for the first 2 weeks this guy does zilch for the project
 
=D Gee that sounds familiar
Yesterday I answered questions on CR, read comics, read an interesting programming paper, spent some time digging into java's number parsing, answered private mail, was working very hard on implementing the video streaming functions, but the standard is a bit hard to grasp.
 
Many thanks
 
9:13 AM
aaand 2 CR answers...
or 3 already? today...
 
Well I dunno if I answered stuff on CR yesterday, there was a lack on interesting questions I think
 
naahh just 2...
one in bash one in objective-c
both things I know zilch of..
and a SO answer abusing Regex for Ignore-case string comparison..
 
9:29 AM
1
Q: Intended to return account address using account ID, which uses Spring Stored Procedure class

MatI have not used Springs stored procedure class before to return data and I was hoping someone would be able to check this for me.. If it will A. Return data, B. Can be improved. C. If I wanted to return multiple rows how would this need to be changed? public class AccountAddress extends Stored...

"unanswered" question with 2 answers
 
0
Q: Logic problem, 2nd zoom and every zoom after that flips y-axis, JavaScript

Bart HumphriesSee the full code at http://jsfiddle.net/6h82nro7/ -- the HTML code kept displaying as HTML tags and hiding itself, even when I indented four spaces to mark it as code. Anyway, it's not important. Here's the JavaScript, where I believe the problem is. After the main image is drawn, the first z...

 
9:47 AM
Kibibit
hmmm... it doesn't have the same ring as Kibibyte
 
T.T
@Pimgd yea I just saw too.. hang on
 
so much edits =D
 
eehhh??
@CaptainObvious sounds helluva lot like borken code.
 
How do I sort unanswered by age?
 
no clue..
 
9:54 AM
Curious.
 
ask the zombie query by rolfl...
 
If you post a bounty, and daylight saving time happens,
you do not lose or gain any hours
 
search for answers:0 and sort by newest, then go from the back..
 
Then again, that's obvious if you consider that they're using UTC
 
0
Q: Which of the following two T-SQL views is more efficient? Two stage GROUP BY of UNION or flat GROUP BY?

peprHaving several databases with the same table, I need to group the union of the records. The xTables are stored in separate databases named by the year (this si by third party design and I cannot change it). There are 3 databases in my case but it could be say up to 10. Each of the tables contain...

0
Q: Beginner number guessing game in Java

jjacobsonI am a first year CS student. We are currently learning java and my latest assignment was to create this random number game. I am hoping to get some feedback on code style etc so that I know what not to do in the future and so that I can avoid getting into bad habits from the start. import java....

 
9:56 AM
1
Q: Mutualising multi-threaded calls to EJB from Servlet

RichI have a Servlet that makes an EJB call to a backing server which takes about a second to return some data that changes reasonably regularly. I can't cache the data on the servlet-side, so I have decided to put the call to the EJB into a separate thread and use a Future to get the data as late a...

it's much easier to do a review if you can Copy&Paste the code into the IDE of your preference. I suggest you add something to make that compile, as we'll probably need it either way ;) — Vogel612 Jun 18 at 14:08
I wanna close it
it's hard to review because it handwaves parts
  public void doGet(...) {

    //obtain or create the current roster request
    final Future<ArrayList<String>> localRosterRequest = getLocalRosterRequest();

    //do other things

    //wait up to two seconds for data from the roster request
    final Boolean hasAccess = localRosterRequest.get(2, TimeUnit.SECONDS).contains(user.toLowerCase());

    //etc
  }
 
fine by me, if you start it, I'll follow up.
@CaptainObvious tempted to close as off-topic: asking about a performance analysis to be performed...
I've seen worse..
 
fixed that
Copy pasta indentation failures are not review material
 
remove the fluff too ;)
> Thanks to everyone!
 
done editting the post in full, I think
Voting to close because the code contains handwaving of various areas. This makes reviewing hard and leaves unanswered, dead questions. I understand you want the review to focus on those parts, but by making the context unavailable, overarching answers are impossible to provide. — Pimgd 3 mins ago
 
splendid
 
10:06 AM
Welp turns out I need part of the fluff for my answer
"I am really sorry but for some reason copying over from eclipse messed up the indentation"
-> "I use Eclipse"
Related

2 “Guess my Number” in Java
3 Number-guessing game in Java with Swing UI
22 “Guess a number” game
10 “Guess a number” game in Java
6 “Guess my number” game in Java Swing
I don't think we can make a better title for it
 
Monking
 
ah yeah that's right
@Yann you can't see deleted posts
 
??
 
I posted an answer and he has the same point as I do even although it was already on the page
 
Uh, I don't think so, no
 
10:21 AM
but I deleted it since I was still working on it
 
I was most of the way through typing that up and saw the "2 new answers", but I decided that if one said what I was saying, but was a faster typer, I'd delete mine :P
Either way, more than one way to skin a program
@Pimgd Yeah, I thought I was implying that, I just wasn't going into exception handling. Unless you think I should?
 
0
Q: Transfer Python data structures through ssh

confused00I need to communicate between 2 machines through ssh to do some processing on one of the machine and at the end, transfer the output to the first machine. Given that I use the paramiko library, I can only make one shell command on the machine I'm sshing to, so the way I do it is I put together a ...

 
0
A: Beginner number guessing game in Java

PimgdUnused imports You're using Eclipse. Eclipse and NetBeans are IDE's that will probably (aside from turning them off) give you warnings about your code. An unused import is such a thing. In Main, you don't use java.util.Random. So you should remove it. Duplicate Code Whenever you can, try to ...

May he learn the process of refactoring early
 
What's your thoughts on the top answer's idea about returning strings (In this specific case) vs a bool
 
@Yann you were playing Knights of the old Republic??
 
10:34 AM
@Vogel612 I have done, yeah :P HK-47 ftw
 
> error prone meatbag
 
Anyway, whenever I'm writing a game to learn like this I always aim to channel a mix of GLADoS and HK-47
It's how I stay sane
 
I don't like the idea of returning String
The idea behind it (Game doesn't have side effects) I support
but I'd have some OTHER class print strings based on the booleans
 
I can see the argument for it, it just seems off
 
except then you get the problem that how do you know it's higher/lower?
 
10:37 AM
@Pimgd Yeah, that'd work,
 
and you get these weird enum responses
 
You could compare the string? search for higher/lower?
Devil's advocate
 
eww eeeew eeeeewwww
@Yann Not i18n proof
 
What. This is a number guessing game on the console. Is localization a concern?
 
change one of the strings' inner workings and you're dead...
 
10:39 AM
Is decoupling the string printing so that it'd work with some GUI a concern?
No, it is not
 
it's not about this instance it's about principles
 
However, from the perspective that
> I am hoping to get some feedback on code style etc so that I know what not to do in the future and so that I can avoid getting into bad habits from the start.
 
It's at least a possibility for this
 
It's definitely a concern.
You don't wanna end up with Stringly-typed code
 
enum. HIGH, LOW, SPOT-ON
 
10:41 AM
Duck-Typing yet again
 
Do with that what you will wherever you call the function
what the hell is duck typing?
 
I'm still considering whether enums are a valid case here
There's also Integer.compareTo
An evil way would be an array of function pointers
 
@Yann thinking String could do what you wanted them to do..
 
[tooLow, exact, tooHigh()]
 
Can you function pointer in Java?
 
10:44 AM
In computer programming with object-oriented programming languages, duck typing is an alternative to typing. In duck typing, an object's suitability for some purpose is determined by the presence of certain methods and properties (with appropriate meaning), rather than the actual type of the object. The name of the concept refers to the duck test, attributed to James Whitcomb Riley (see history below), which may be phrased as follows: When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck. In duck typing, a programmer is only concerned with...
 
Then array[Integer.compare(guess, randomNumber)+1]
 
@Yann runnable. or.. lambdas
 
ah it'd be so darn easy in AS3
Well, I guess that's actually bad
if bad things are easy to do
Last night on some website I recommended someone to alter the list of eventListeners to add himself at the end, and if he's called again, to remove the earlier eventListener
 
1
Q: Python odd number diamond

AndrewI worked up some a quick diamond program that takes only odd numbers while returning an error with even numbers or 0. The code looks rather ugly to me, especially with the recurring int(). I haven't found out how to clean that up with my ENTER to quit. while True: number = raw_input("Enter an o...

 
I've managed to do horrific things with exceptions in java. I used an exception to exit a while(1) loop and start the end of the program in my 2nd year of uni. My excuse is I can never remember the correct syntax for good File IO in Java, my way was quick and short, and the alternative was awkward.
 
10:50 AM
... Last night I also concocted a way to prevent a stack overflow...
 
@Pimgd try catch?
 
@Pimgd Write to the bottom of the stack, overwriting what's there, claim that you're pushing onto the top, and don't tell the user?
 
you have two functions, f() and g(). f calls g. G calls some framework which may or may not end up triggering an eventlistener and then calling f(). How to avoid a stack overflow?
Well, since f can't be called by anything else but g -> framework -> f when you're in f...
boolean calledTwice = false;

function f(){
  while(!calledTwice){
    calledTwice = true;
    g();
  }
  calledTwice = false;
}
calledTwice is actually a poor variable name
 
It technically fixes it.
 
but I can't come up with a good one
 
10:54 AM
0
Q: Project Euler Problem 1 - Functional approach?

Overly ExcessiveI'm trying to learn F# right now coming from C# and I'm finding it a great difficulty to "reconfigure" my mind to the functional programming mindset. So I'm going to attempt a few Project Euler problems to learn how to code functionally. Here's my attempt at problem 1, now I'm wondering prorimar...

0
Q: Hide content unless an array contains at least one non-empty string

PhasyI have an array of hints. Sometimes, this array could contain an empty string. Occasionally, the array might contain only empty strings, in which case I want the whole block to be skipped. This is what I came up with: <% @hints.each do |hint| %> <% unless hint.empty? %> <p>Please obs...

 
But it's pretty evil tbh
 
"Mildly evil" describes my coding practice after hour 3 headbutting a problem
 
My coding practices can be describe as a list of best practices
and then as time passes on, the word "screw" starts to fold down in front of it
 
Ah good, I was concerned until that 2nd line appeared.
 
My programming practices
screw (folded)
      class documentation
      updating the uml diagram
      private function documentation
      public function documentation
      comments, except for the clever bits
      removing traces after it works
      trying to keep complexity low
so as time passes you get
My programming practices
screw (folded)
screw class documentation
screw updating the uml diagram
      private function documentation
      public function documentation
      comments, except for the clever bits
      removing traces after it works
      trying to keep complexity low
 
11:02 AM
I'm surprised that class documentation goes before uml. You must have uml tools that aren't garbage
 
@Pimgd at least you once had no screws before the good ones..
@Yann a good classname makes javadocing it even more useless..
 
@Yann The UML tools I use are only for classes and relationships
 
so that's the first thing to get dropped
 
I make boxes with names and arrows.
I don't give these boxes attributes unless they're enums
 
I've still found that pen + paper > any given uml tool
and whiteboard > all
 
11:03 AM
so "UML" is really this
 
go to programmers, then ;) @Yann
 
[Product] * <--- * [Order]
but with images and stuff
ah yeah
at the bottom of the list:
 
@Vogel612 It took me far too long to get that
 
releasing
updating usage documentation
testing
 
isn't it the other way round, mostly??
 
11:05 AM
Ah no
I have to update the usage documentation
or I'll forget
uh how do I put this
It's a project I do in my spare time... sometimes I don't work on it for weeks
so if I don't update the usage documentation then features get implemented and eventually released with nobody knowing they're in there
Like right now
Some user wants features x y z
"sure", I said
but you get to test them
I build something that looks like it works, build it, it doesn't give errors,
here's your test build
Then I go back to gaming and I'll hear whether it's broken or not
testing mods sucks
 
Are you contracting? Or just a stunningly lax office?
 
I'm modding games in my spare time =)
 
Ahhh
 
which is where a lot of the hax comes in
You can't change the game...
but the game does need to work differently
so you do crap like altering an object's function table to point to your function which just calls the original game function except if parameter X's value is Y
which is a terrible way to program, but it's fun puzzling
 
Fair enough. Any mods I might have heard of? I don't follow the mod scene too closely though
 
11:15 AM
0
Q: Formatting checks against a session

JamesJGarnerThis is the current code that gets put into a option box, is there a way to make this code more efficient and use less code <select name="searchTypeSelect" id="searchTypeSelect" size='1' class='searchUtilityMenu' > <option value='<%# ((string)HttpContext.Current.Session["whichMenu"] == "...

 
Not likely, considering I'm modding... explicit games
at the end of the day it's all code
the feature requests are just far more diverse and silly
 
Is it a big market? Games is what I do (In real/fake life (Uni)), but I've not really heard much about explicit games industry
 
From what I've seen, you're not gonna make sales.
It's just pirated too much.
Plus you can't exactly put it in retail
or on steam
Patreon seems to be pretty okay with it though, so it's far more likely a project gets crowdfunded some way
 
Yeah, I guess so, so it's something that you've got to go actively looking for
 
And I tend to see far more collaborative work
Almost as it's made by the people for the people of community X
From a game design perspective it's also interesting and I wish I could find books discussing it
or other online resources
 
11:22 AM
The closest I've got to it was when I was in a tabletop RPG game doing exhalted, and someone took a feat from a eXXXhalted rulebook that allowed them to take 3d10 items of clothes off someone/round
 
Because there's two types of content, almost
 
It was actually useful in a non-sex way, because if you can take all of someones clothes off, that fancy, expensive armor isn't helping them :P
 
and balancing between the two is hard
maybe it's similar to balancing RPG's dungeon and story sections?
 
Probably. I'd be kind of interested to see the challenges in making it engaging
 
There's also a part where people are doing far more for user experience too
 
11:25 AM
Although I'd have to play quite a few of the games through to get a feel for it
 
cause you probably want it to be playable with one hand
and you get interesting control schemes with this
like Left mouse to select things and Right mouse to cancel
 
Yeah, you don't get to mess up key bindings, that'd bug customers
 
And multiple control sets too (WASD and arrow keys doing the same thing)
 
Having re-bindable keys is just a good idea in general anyway
 
I mean aside from rebindable keys
Take a visual novel for instance (there's plenty of non-explicit ones around)
Normally, to access some kind of menu, you have to press a special key (ESC)
but this would require the other hand
so many of them put the interesting buttons on the textbox that has the text
Besides there's other ways to justify spending time to make designs one-handed
 
11:29 AM
Hm. Aside from the problem that these games are solving, it's probably leaps and bounds with accessability
 
I like games I can play whilst eating a bag of crisps
Nothing sadder than opening a bag of crisps and then having to decide between gaming, eating, or dirty keyboard cause salt and other flavoring is stuck to your hand
hmmmm nachos
 
NO
 
Yes
 
I AM AT WORK, LUNCH IS NOT FOR HALF AN HOUR AND I AM HUNGRY
NO TALK OF NACHOS
 
hahahaha
But yeah they do provide interesting problems and solutions
Building an RPG with only 3 save slots...
That'd be a really bad idea
What if I want to rewatch a different scene?
 
11:34 AM
Is there a reason to have only 3?
 
Screen space and round numbers
4 save slots fit on the screen, so 4 save slots it is
Yeah... that works when it's just about playing the game
you can get away with 2-3-4...10 save slots like that
 
Or don't display saves in a grid?
 
See that's the thing, normally you wouldn't consider that
 
List + small screenshot
 
It's just a save game
who cares
Yet find a visual novel and you'll see 100 saveslots, mini screenshots, ability to name saves (even after saving!)...
 
11:37 AM
room topic changed to The 2nd Monitor: General discussion about Code Review -> codereview.stackexchange.com [addicted-to-cr] [ignore-the-trolls] [just-saying-hi] [monkey-business] [my-code-is-compiling]
Monking All!
 
Aww, no more arguments
It's lunch time now
 
Monking
Damn you and your nachos
 
> 365 days, 365 consecutive
5
 
I'd recommend finding some of those games and just playing them from a game design perspective. Within 10 minutes you can see a lot of things a game does right or wrong
and it's technically no different from exploring any other genre like horror or platformers or shooters or card based games or what have you
 
Yeah, I think I will. However, it will have to wait til I'm at home :P
My fiancee will still give me a funny look though...
 
11:47 AM
 
No here.... One day I will miss a day, just so that I don't feel obliged to maintain the unbroken record.
 
I missed one for my wedding. Broke a nice streak.
LOL.... nice.
 
I never congratulated you.... Congratulations... that was.... 4 weeks ago? 2 months?
 
About a month ago. And thank you!
 
12:05 PM
@Yann It helps if you keep your pants on when explaining it's for research purposes
Actually, I think that short of medical problems and wardrobe malfunctions, keeping one's pants on helps with any explanation
 
@Pimgd I suppose that might help...
 
... maybe she's interested in game design too?
=D
 
It would either be a hard sell, or a stunningly easy sell, depending on a coin toss, I feel :P
 
Huh, actually I have no idea whether it would be better to be able to understand the game's language or not
Probably yes given that if you have no experience with playing games in foreign languages it's just hopeless
... new topiiic
come on, captain, post a question we can argue about
 
@Pimgd Should I have closed this, or answered it... and, since I downvoted the question, the asker can't upvote my answer... was that a smart thing to do?
1
Q: String compression using repeated character counts

Rohit Katyal Implement a method to perform basic string compression using the counts of repeated characters. For example, the string aabcccccaaa would become a2blc5a3. If the "compressed" string would not become smaller than the original string, your method should return the original string. Can this...

 
12:16 PM
@rolfl He can accept it and then upvote it
That's just a fact, not saying he should
 
That won't be enough.... accept gives him 11, he needs 15
 
oh
 
still should i have closed the question, after it got an answer?
 
Why the downvote
 
should I upvote this answer, it makes a point, but misses a big flaw: codereview.stackexchange.com/a/68348/31503
@Pimgd The code is royally f'd up.
does not produce the right answer even for the supplied example input.
 
12:18 PM
I don't downvote homework
I close broken code
 
See, I normally would, but, it was complicated in this instance.....
 
this needs closing
It does not need downvotes
 
See, captain Obvious posted a question we can argue about ;-)
@Pimgd For the record, it produces the correct output if you compile/run the code.
 
@rolfl What does his actual program produce, where he does System.out.println(ch.compressString("abbcdrfac"));
monking btw
and what does his aabcccccaaa actually produce ?
 
well, the actual compression of "abbcdrfac" should be "a1b2c1d1r1f1a1c1" ....... and that's longer than "abbcdrfac", so the program outputs: "abbcdrfac"
internally, though, the program computes "a2b2c2d1r1f1" which is also longer than "abbcdrfac"
 
12:24 PM
@rolfl You got yearling now?
 
Not yet... that would be tomorrow, I guess.
 
@RubberDuck Congratulations to you and your duck wife!
That means that I'm also getting it soon...
 
@SimonAndréForsberg Thanks! I'm a happy mallard.
 
@rolfl retracted close vote for this reason
apparently he tested it
and it returns the correct result
 
Bottom line is that the program produces the right result with the supplied inpu8t to the program, but not the input for the problem......
 
12:26 PM
Should get it on November 2nd or 3rd. Assuming that I have got > 200 reputation the last year of course...
 
Have you? Why don't you bounty it all to me just to see what happens?
 
@rolfl i.e. it is not tested as much as it should be
@rolfl Tempting but, umm.... How about no :)
 
The thing is, the actual algorithm he implements obviously just counts the letters in the string.... not the run-length-encoding.
I say 'obviously'.....
And I can't bring myself to upvote Sleiman's answer.... because, even though it is right, it is so .... missing the issue, and beside the point..... and it feels like it is saying that there are no other problems.
Anyway, obviously none of you others feel my answer is good either ;-)
There's been a rash of that. I am losing my touch ;-)
Not a guilt trip, promise ;-)
 
0
Q: Best practices to fill view models in ASP MVC

LandeeyoI'm a beginner in MVC, but nowhere can find an answer for my doubts. I'm using view models over models. Let's say we have an edit form for some entity. Let's say that form has a field which is selected from drop down list. What is the best way to fill list used for generating that drop down list?...

 
Sorry, haven't voted as much recently.
 
12:36 PM
Yeah, it is all your fault... ;-)
 
0
A: Creating a "Produce and Consume" using Swingworkers

PimgdDon't lock on non-final objects. The reason for this is that something later may change the variable. I might say _addingList = new ArrayList<>(); and then the synchronized blocks fail. //ProduceWorker @Override protected void process(List<List<Integer>> chunks) { jReadyNumb...

Zombie kill that finds a race-condition bug
 
Off topic @CaptainObvious
 
0
Q: Class template specialization for empty template parameter

TimI'm implementing classes for simulating and generating different kind of automata. I'd prefer to use the same State and Transition classes for all the automata: NFA, DFA, PDA, etc. For a PDA a transition from one state to another work require some sort of an extension, because the transition req...

This might be more suitable on Programmers
 
TTDB (Time To Donate Blood)
 
it's more about design than code
 
12:56 PM
0
Q: Python compute adjacent days from date string

confused00I'm trying to do some datetime processing. The input is a string of the form 20141005 ('%Y%m%d') and I want to return a data structure that stores the day before the input date, the day from the input, and the day after along with the day after that in a %y%m%d format (141005) This is my functio...

 
In it's current form it is hard to review, but the question seems on topic.
Unfortunately, that user hasn't been on since the 3rd. Maybe not that important of an issue to them?
 
00:00 - 13:0013:00 - 00:00

« first day (544 days earlier)      last day (3466 days later) »