« first day (368 days earlier)      last day (3651 days later) » 
00:00 - 15:0015:00 - 00:00

12:00 AM
Welcome to Code Review! We're not the right place to help you implement the features you want in your code, we review your working code. Is it working? doesn't sound like you're confident that your code is ready for a peer review. Please edit this question so as to include the parts that work as intended, and we can help you do it more efficiently, with more elegant, readable and maintainable code. If you're stumped you might want to ask on GameDev.SE. Good luck! — Mat's Mug 6 mins ago
Now I have an ad idea for posting on GameDev.SE...
@rolfl @Jamal am I being over-zealous on that one?
the code, as posted, doesn't compile...
 
is this sarcasm?
+1 I really like the way you used keywords and variables to come to a solution. — Jeroen Vannevel 6 mins ago
time to eat, I guess I have to do that at least once a day
 
@Malachi you should fill up your bot's/puppet's "about me" profile
 
I am still setting up the bot on my computer, or trying to figure out how to do it anyway. bbiab
@Mat'sMug will do when I get it running
I will post a meta post or something
 
@Malachi Not at all, just giving you the upvotes so you can talk with the bot
Just a joke, since you know: keywords and variables make a program
2
I'll get back to writing my paper :(
 
@Malachi you should stack the consecutive using blocks, no need to further indent ;)
2
 
12:07 AM
0
Q: httpclient: Let OpenSSL decide which TLS protocol version is used by default

aefI use Gem in a Box, a Ruby project that allows to create personal self-hosted gem repsitories. Gem in a Box uses httpclient to connect to the gem repository. After reviewing my server's TLS setup in the aftermath of the OpenSSL heartbleed bug, I decided only to allow protocol versions of TLSv1 an...

 
@CaptainObvious OpenSSL is secure now, you're good to go!
 
@CaptainObvious Cool hat, bro.
 
@rolfl Thanks! According to this, , , and are my next three closest tags to 15. This will take a while (and I don't know C#)...
 
2 votes short of [badge:guru]:
38
A: Is my coding technique progressing in terms of C# loops?

Eric LippertThe second sample is definitely better. I would be inclined to continue to improve the code by separating mechanisms from policies. The policy is the code that actually expresses the meaning of the program; the mechanism is the code that expresses what specific operations implement the policy. ...

and the OpenSSL question was edited with some code added, is it good to reopen?
(IDK )
(nevermind - thanks @200_success!)
 
12:25 AM
TTGSTE
(Something To Eat).
 
@Mat'sMug do we want hiim hoggin all the good badges? jk
@Mat'sMug I will look into it in a little bit
I am doing everything from my laptop, my family took over my new desktop....
lets see what happens
I think I left something unset or something......
 
1:04 AM
0
Q: VB: Help : PayPal Login Program

user3599914i have a little problem to login into paypal account, (my program is just for tests), so i have two button, the first one open the paypal login URL, the second button edit the emailbox & passwordbox with my information & click to connection button into paypal login panel to enter to my account.th...

 
1:37 AM
0
Q: Jquery for hide and reveal toggle responds very slow

user42010I have a list of 6 items, and each one on click reveals a div that runs 100% wide under the row of list items. The code works, but the div opens very slowly and kind of choppy. Is there anything I can do to help it run more smoothly? My HTML is set up as such: <ul> <li><a class=...

 
2:14 AM
ok
 
2:30 AM
0
Q: Too many repositories?

kirsten gI am wondering if I have overdone it with repositories in the following code which is to save a sales order. I understand that the purpose of a repository is to decouple the domain layer from the persistence layer, but this code seems to be replicating what EF does anyway. public SalesOrder Fin...

0
Q: Android launch failed after setting up OnClickListener

IsaacI have encountered a problem with my android launching system after setting up the OnClickListener. Here is my following code... When I tried to launch it, it display "the application has stopped unexpectedly. Please try again". please help me with this error. Thanks public class MainActivity ex...

 
2:57 AM
we have a new flagger
 
Context?
 
someone was flagging stuff from 2 years ago. and then someone also had a new answer on an old question as well
I got the Stat thing to work as well
it's kind of picky
 
@skiwi - FYI: (pay attention to the name) stackoverflow.com/a/23507958/1305253
 
3:23 AM
I am going to leave that bot going tonight and see what it does while I have my other stuff running this computer.
I might try to move it from Firefox browser to Chrome tomorrow night because chrome seems to run lighter and faster

 BlueCheese Monster's Home

place for Debugging Cheese Monster
 
3:44 AM
0
Q: How did downvotes suddenly put these old answers into the Very Low Quality queue?

JamalThis answer and this answer (both "looks good" answers with no detail), posted some years ago, were recently put into the Very Low Quality queue after receiving downvotes. According to the queue, they were added because of their (lack of) length and content. When the system detects this, Commun...

 
4:27 AM
We need some more Scala people here so I can ask for design advice.
3
 
I did answer one Scala question. ;P
 
So now you're ready to give advice on an actor based event dispatch module?
 
Hmmmmmmm. No.
 
And thus, my comment.
 
@Mat'sMug Yes, but even gurus have a responsibility to vote.
@EricLippert "Thanks — good point about X" comments are fine; just "Thanks" would be noise. Votes are the currency of thanks that makes Stack Exchange sites work, so we prefer voting — it's the most rewarding form of thanks possible. I notice that you have only voted twice so far. Code Review would benefit greatly from having experts like you recognize good questions and answers from other members by voting. — 200_success ♦ 2 mins ago
3
 
4:35 AM
@200_success I already voted on that answer.
he has only voted twice?
 
Yes, just two downvotes.
 
that is disappointing
 
I'm guessing he's just very critical about how he votes.
 
anyway I am off to bed, I fell like I have accomplished something, I got that bot to work, and will be looking to create a function for the RSS feeds tomorrow night I think
 
Goodnight
 
4:40 AM
night
feel free to check out that bot @Jamal

 BlueCheese Monster's Home

place for Debugging Cheese Monster
 
If you feed the RSS what do you get? A lot of fat little RSSes.
 
-1
Q: Want to add a loop, wich one will it be better? I want user to promp to stay or leave the Console and continue to do operations

Peterstatic void Main(string[] args) { Console.WriteLine("Program to convert USA Dollars to five different currencies,"); Console.WriteLine(); double dollars, euros, turkisLira, yen, britishPounds, mexicanPeso; char option; euros = 0....

 
1
Q: Chat Bot for 2nd Monitor chat room

MalachiFollowing these posts How far off-Topic can we get in the Code Review General Chat Room? What are the Stack Exchange limits on chatbots? Chat bot feature requests I found that there was a Bot running in Root Access, which is Superuser's main chat room. I gathered the code for this chat bot, ...

 
5:23 AM
If this code works as it should, then it would be better for Code Review. — Jamal 2 mins ago
 
5:49 AM
morning all
 
Morning
 
how are you jamal?
 
morning
@rolfl Pretty cool ;)
 
I'm okay. My summer has finally begin.
 
Morning.
 
5:58 AM
morning @Vogel612 and @skiwi
summer? yesterday rain rain and again rain
 
today rain....
 
yes indeed :)
can someone tells me how to sort on tag and unanswered?
 
search by tag, and choose "unanswered" tab.
 
setting some bounties :)
 
6:20 AM
@chillworld there's not that many clojure guys here..
 
well then we have to attract them ;)
 
he's our top clojure answerer ;)
 
7:06 AM
0
A: Trains scheduled, find max platforms per stations

chillworldQuick review, but still good coding like usual. Naming : int i = 0; // ctr for start time array int j = 0; // ctr for end time array Isn't it better to call them pointerStartTime and pointerEndTime? It helps you when you are programming. Take in mind that you get this code and must find a l...

@Vogel612 sorry was writing a review
 
don't mention it..
 
brb now smoking one
just thinking that the map where strings are the key isn't the best solution
or the strings must be literals in the class
 
How about using an Enum instead?
Problem is, that Enums are not really dynamic...
 
I'm reading so much back of yesterday now...
 
lol @skiwi just let it be as is..
 
7:15 AM
Played Civilization V a little bit too much, and had to ignore everything else in my life since afternoon.
@Vogel612 Nah... there were some interesting conversations ;)
 
enum as key is not a problem
actually good idea
 
are you not talking about your review??
 
yes
 
there is that Map<String, Integer> stationMaxPlatformMap
 
indeed, but I'll leave it like that
on to the next (and this is refactoring mine own project :D)
 
7:29 AM
I might be dumb, but anyone knows how exactly I use this?
I might've found out how to do it, but haven't found instructions on the github site there unfortunately
 
@skiwi I gues @rolfl can tell you :D
now he's noticed :)
 
But he's sleeping at the moment ;)
I want a dedicated keyboard for this application... Then I can feel cool. (The application consists of multiple projects, which need to be run simultaneously)
It is working at last
 
7:46 AM
gratz
 
7:57 AM
Just did single file tests so far (because of performance bugs), now firing 10+ and seeing how it crashes
 
0
Q: View Model Filling Fields

Ryan McDonoughI'm currently getting into MVC, and I'm working on a simple CRUD application but to make best use of relational database layout I need to use ViewModels so things look prettier on the UI. So I have a ViewModel: public class CreateAPIViewModel { [Display(Name = "Name")] public string Nam...

 
This is a nasty bug:p
It is only triggered if a class accesses a method of an utility class, triggering static initializers
 
Dat Junit sh*t with static initializers?
that's not a bug..
probably..
 
no, it was something else, nothing to do with junit
 
lol 3 dutch people and speaking english ^^
 
8:05 AM
no dutch..
well Cya TTQtheInternetz
 
I think I managed to crash my logger
 
0
Q: Airline/Hotel reservation system in Python : Follow up

ArmanFollow up for my initial question. Modified my earlier code and adding new changes. Initial Question in Code Review import random class Booking: def __init__(self): pass def checkAvailability(self,**kwargs): booking_type = kwargs['booking_type'] booking_class =...

0
Q: dhtmlxCalendar with Angular

user3582665I use dhtmlxCalendar and Angular. I have any number of INPUT's. And INPUT's must have the same date. You can change date in ANY INPUT. And ALL INPUT's must react instantly (change date instantly). In my task I used Javascript partially (to detect changes in INPUT when I clicked on Calendar). But...

0
Q: How to extract one table from two tables using jsoup

IsaacI would like to extract data from the table that contains "100g of broccoli" instead of extracting data from two table simultaneously. Any ideas? The website is http://beta.weightlossresources.co.uk/calories-in-food/veg/Broccoli.htm import org.jsoup.Jsoup; import org.jsoup.helper.Validate; impor...

 
last question is unclear to me
he's looking at one "cell" he just asks for who knows why another cell first.
and he completly mess up in the title tabel and cell
 
8:23 AM
This has totally blown my mind
You don't need to use Collections.synchronizedSet at all
Collections.newSetFromMap(new ConcurrentHashMap<>()) gives a concurrent set
 
9:21 AM
2
Q: Stable custom alphabetical order using List<T>.Sort

helixBackground This is a problem from a programming contest. The Sharonians of planet Sharon, at the far end of our galaxy, have discovered various samples of English text from our electronic transmissions, but they did not find the order of our alphabet. Being a very organized and or...

 
0
Q: Bash Music Player 2

Amr AymanThis post is a possible duplicate to this .. But anyways, I wanted further review since the code I provided became too old when I got replies .. Which is why I'm providing it again here, hoping I could get review for the new code .. Here it is .. #!/bin/bash mkdir -p "$HOME/Music" ; cd "$HOME/M...

 
9:46 AM
0
Q: Is it a good idea to pass the stream

prabhakaranI am making a testcase in c# which has step by step methods. Each method has its own log info. Now in writing this log info I am passing logFilePath as an argument. Each function opens it in a stream and writes into it. Because I came from c++ background. My previous company senior programmer(c+...

 
@CaptainObvious offtopic following me
but he's doing correct
 
10:11 AM
0
Q: Can my text-mining algorithm be improved

KevinI have a little text-mining algorithm (which is used by our project). Can this be improved? Are there other/better algorithms suited for this? The goal is to analyze many Tweets. Regards, Kevin

 
This is some evil stuff:
Pointer<Tesseract.TessBaseAPI> api = Tesseract.TessBaseAPICreate();
C# naming conventions in Java...
Too bad it isn't my API
 
0
Q: Carousel Liquid advice for improvement

Thomas TaylorI've implemented a JQuery carousel using Liquid templating that functions correctly however, I feel the Liquid is a bit bloated. Looking for advice on improvement and/or alternate implementations in less lines. Code: <div class="row"> <div class="large-12 columns"> <div id="hoot" ...

 
Hey @skiwi .... bugs in Resolver?
 
morning @rolfl
no no bugs, but the wiki is pretty unclear :( Probably because I havelike just 1% familiarity with JDOM etc.
I managed to get it working with this code though, perhaps a bit evil:
private static final ThreadLocal<SAXEngine> XML_ENGINE = new ThreadLocal<SAXEngine>() {
    @Override
    protected SAXEngine initialValue() {
        try {
            XML_BUILDER.setEntityResolver(new CachedHTTPRepository(Base.HTTP_REPOSITORY_DIRECTORY.orElse(Files.createTempDirectory("http-repository-cache")).toFile()));
            return XML_BUILDER.buildEngine();
        } catch (JDOMException | IOException ex) {
            throw new RuntimeException(ex);
        }
    }
};
And I just downloaded the source files and put them directly for now... But I think it's more usual to include a jar?
 
@skiwi You must be the guy that embedded the most code directly in the chat :p
2
 
10:23 AM
@Morwenn I'd like to see a statistic about that...
 
@skiwi Would need a request to find the number of messages beginning with 4 spaces :)
 
I'm sure @SimonAndréForsberg can make it ;)
codereview.stackexchange.com/users/4318/eric-lippert It is weird to see him talking about himself in third person :p Struck me when reading his bio
 
@skiwi - that looks good...... but could be better. There is no Jar file for it ... it is..... really small, and I figured a jar may be overkill..... but, I think I will change my mind about that.
As for including it in your SAXBuilder.... don't createa new one in each ThreadLocal....
 
Well just from experience, I was a bit confused as I got a bunch of java files prompted before me and that was essentially it... Only at like the last paragraph of the readme I saw a very small textual (no code) reference to an entity resolver and a light started to blink
Also, just throwing this out now as I got lunch soon (okay that might sound wrong)
 
Have a private static final CachedHTTPRepository RESOLVER = new CachedHTTPRepository(Base.HTTP_REPOSITORY_DIRECTORY.orElse(Files.createTempDirec‌​tory("http-repository-cache")).toFile())); and then reuse that instance in all the XML_BUILDER
 
10:29 AM
Any reason you prefer manual synchronization on a set over Collections.newSetFromMap(new ConcurrentHashMap<>())? (As I prefer the latter over Collections.synchronizedSet().
 
I argued the same to those persons. But ,they were strong in there arguments. Your answers are warmly welcomed at stackoverflow.com/questions/23513771/…prabhakaran 1 min ago
 
@rolfl The XML_BUILDER itself is already static though
 
Seems that we have to tell once again to SO users what CR is for -____-
 
But it would be nicer for seperation of concerns
 
But the setEntityResolver() is being called with a different one each time.
(each thread).
 
10:31 AM
okay
lunch now, reading up in 30 mins orso
 
The CachedHTTPRepository is threadsafe. You want just one of them (it keeps recently used documents in memory
 
@skiwi (Monking!) lol, I probably can. Some day :)
 
Hey @Simon
 
Hi @rolfl
Three more up-votes for the monkey needed! Three more up-votes!
20
A: Custom indexOf() without String methods

rolflComplexity Pedantically, the time-complexity is \$ O( m \times n ) \$, where m is str.length and n is substr.length. This matters when \$ \left| m-n \right| \$ is large. The Space complexity is \$ O(1) \$. You do not allocate any size-based memory structures. Safety It all looks good. There a...

 
hehehehehe Yeah, 3 more upvotes..... brign em on!
Oh!.... Thanks Santa. I figured everyone here had voted for it....
 
10:41 AM
Nope, I am mostly not here these days :p
 
hehehehehe Yeah, 1 more upvote..... bring it on!
@Morwenn even when you were here, you were mostly not here ..... right?
2
 
@rolfl What? xD
 
(people know when I am trying to be witty, right?)
 
I was translating some manga yesterday.
 
And .... TTGSomeBreakfast ...
I have a big work-day today ... will likely be 'offline' for the next 11 hours.....
 
10:44 AM
Good luck :p
 
11:04 AM
back alive
@SimonAndréForsberg Monking aswell
 
Target Reached! No more upvotes for Monkey required!
23
A: Custom indexOf() without String methods

rolflComplexity Pedantically, the time-complexity is \$ O( m \times n ) \$, where m is str.length and n is substr.length. This matters when \$ \left| m-n \right| \$ is large. The Space complexity is \$ O(1) \$. You do not allocate any size-based memory structures. Safety It all looks good. There a...

This user has really understood the importance of voting:
 
He has some votes there
5
A: How far off-Topic can we get in the Code Review General Chat Room?

JamalAccording to the Talk in Chat privilege page: When should I visit chat? for real time collaboration to meet the fellow members of your community in a more social environment for less structured, casual (but still roughly on-topic) conversation As this primarily pertains to th...

We're never off topic here, right? Right?!
6
 
0
Q: replace characters to make digits

tinybyteI'm using this function to replace utf8 representing numbers in text to convert them to normal digits (PHP), I'm wondering if this is optimized code since this is using two str_replace()s public static function convertArabicNumbers($string) { //$engish = array(0,1,2,3,4,5,6,7,8,9); $per...

 
11:51 AM
@skiwi I don't even know how to spell of-topci.
2
 
I'm getting crazy by using C in Java
 
Iterative code reviews are good. But iterative code reviews when people don't actually implement the good advice from the previous reviews are not that great :/
2
 
It is backed by Tesseract, then through BridJ and jtesseract I can call the API, but getting dll's registered is a hell
@Morwenn That's... understandable and annoying I can imagine
Holy, this code is evil for registering the current class (Courtesy of BridJ)
 
@skiwi It did not happen to me, but I just spotted a "version 2" review in Python that only implementend half of the great ideas provided in the "version 1".
 
public static synchronized void register() {
    StackTraceElement[] stackTrace = new Exception().getStackTrace();
    if (stackTrace.length < 2) {
        throw new RuntimeException("No useful stack trace : cannot register with register(), please use register(Class) instead.");
    }
    String name = stackTrace[1].getClassName();
    try {
        Class<?> type = Class.forName(name, false, Platform.getClassLoader());
        register(type);
    } catch (Exception ex) {
        throw new RuntimeException("Failed to register class " + name, ex);
 
11:55 AM
@Morwenn look at the bright side, he listens already for 50%
2
it could be worse
 
I have to admit that I did not take into account all the answers to my first question when I did an iterative review.
But I had 5 answers! Not always compatible.
 
@Morwenn I have a different view as you, even when you say 10 things. When the OP do 1 thing you suggested your goal is already there. He did refactor following (a part of) your answer. He hopefully learned that point and will not make that mistake/bad usage/... again. So hopefully next posts of him doesn't contain that so it shows that YOU make a difference for him.
 
@chillworld I have to agree, but in some cases, the proposed modification are both great and trivial to implement. It's a shame to see that they are not always implemented :/
 
12:11 PM
I repeated one thing for JavaDeveloper recently, I think it was just an honest mistake this time that he didn't learn from my previous review.
So hopefully, the OP will learn next time @Morwenn.
For some questions though, they can perhaps be closed as duplicate if they haven't learned from the previous things.
I think I just edited a post before @Jamal did!
 
@Morwenn its indeed a shame that the OP doesn't implement great things that are said. Now there can alsways be a reason why like a stupid teamleader that want it like his superior code or just java restrictions like external packages that are forbidden or lower java version.
@SimonAndréForsberg I saw it, I guess he get it now ;). Did also a review today for javadeveloper
 
@Donald.McLean I wanted to learn Scala, but I found it very hard to learn it. Maybe some day we can discuss actor models :)
We need 44 more questions for me to earn [badge:taxonomist]...
 
hi!
 
hey @Mat
 
12:23 PM
Hey Mug :)
 
hey mug
 
I'd so want to ping you with @Mug but that doesn't work :(
Perhaps next time you can become @Mug's Mat?
2
 
I hate it when github repo's don't provide releases for code that is obviously intended to be used by tons of people...
Appereantly I had some "too new" stuff in this wrapper because that version was ahead of a depdency
 
@SimonAndréForsberg perhaps @insert_name_here would be a one-size-fits-all?
 
True, that would fit well into your constant identity change.
When's the next change btw, @Mat'sMug?
 
12:28 PM
yes, I have progress!
 
@SimonAndréForsberg waiting for my next life to start ;)
 
Ah, your next job you mean? :)
 
yup
 
> You've earned the "Populist" badge for Custom indexOf() without String methods.
2
Thanks Santa! ( @Simon )
 
nice!
meeting...
 
12:31 PM
@rolfl You're welcome, monkey!
I was wondering why you hadn't got it already, I guess @StackExchange is just slow as usual :)
 
Hey, @Mat'sMug - I'm aiming for bronze [badge:c#] ;-)
 
I just need one more android upvote and I'll get a bronze!
 
brb
 
Finally, I can feel like I'm an important Santa
 
You are an important santa ;-)
Important to me, anyway ;-)
 
12:43 PM
@rolfl do he send you gifts? :D
 
What do you think about this "Java"?
Pointer<Tesseract.TessBaseAPI> api = Tesseract.TessBaseAPICreate();
Tesseract.TessBaseAPIInit3(api,
        Pointer.pointerToCString("C:\\Program Files (x86)\\Tesseract-OCR\\tessdata\\nld.traineddata"),
        Pointer.pointerToCString("nld"));
 
Mugsy must be on the East coast. it's only 7:45 AM here
 
@Malachi mhh east coast, wasn't that @konijn favorit american beer?
 
lol
TTGTW
 
12:53 PM
0
Q: Reviewing legacy multithreaded code

user193655Here a paste the code of a legacy unit i maintain, my comments after the code. unit uCallThread; interface uses Classes, uMailSenderThread, // here TMailSenderThread is defined, and email messages are created and sent uMailConfiguration, // this is a unit containing configuration para...

 
paste link with http:/ at front for autobox.
 
was searching what the TTGTW means => got that as first result in google
 
NSFW Language in there ......
 
ow lols, Can't play @work cause have no streaming media allowed
 
12:55 PM
Got headphones here ... all OK ... ;-)
 
@rolfl is it good or not? ^^
 
We get NSFW songs on the radio
 
@chillworld What, the video, or the headphones?
 
the music :)
 
The video is disconcerting, it has a song, and people rapping/singing, but what the peoples' lips are rapping/signing is not what the song is playing.... so ... disconnect.
But, it is Time To Go To Work
2
 
12:58 PM
work? what's that? I'm just doing a hobby what get me paid :p
 
monking
 
@BenVlodgi monking
 
I'm back from my travels
my software worked :)
so far ;)
 
@rolfl Do I have to search the monkey on the picture ^^
nice pic
 
1:03 PM
looks like this one is having a deadlock issue
1
Q: Reviewing legacy multithreaded code

user193655Here a paste the code of a legacy unit i maintain, my comments after the code. unit uCallThread; interface uses Classes, uMailSenderThread, // here TMailSenderThread is defined, and email messages are created and sent uMailConfiguration, // this is a unit containing configuration para...

 
off topic
THe problem is that this implementation makes the CPU of the machine where the service app is running go to 100% and freeze the complete system untill the service is killed.
 
0
Q: Speed problems with SetValue, ToType and Reflection

dwoschI have a 'speed problem' with a program im currently developing. I already have encountered the methods which costs some time. public void ConvertDataFrameToValueFields() { List<byte[]> items = new List<byte[]>() { new byte[2], new byte[2], new byte[2], new byte[2] }; items[...

 
I hate to write unit tests, but they are really useful.
 
I turn them in to a coverage game.....
 
That's pretty much what I am doing...
 
1:13 PM
(I hate them, and love them, at the same time... ).
 
@chillworld TTGTW = Time To Go To Work
@rolfl Said it best
@skiwi Superuser boasts their off-topicness
 
@Malachi - you saw my meta answer .....
 
@rolfl I don't think so, I saw @200's
 
0
A: Chat Bot for 2nd Monitor chat room

rolflTool vs Toy. I have worked in chat rooms before where a bot was able to provide meaningful service (as well as occasional entertainment value). If this bot is primarily a tool, and not a toy, then I can see a future where it is a valuable contributor to the chat room. In order to qualify as "p...

(don't you love it when the moderators have different opinions? )
 
I like the Comment Template Library
and the stats stuff.
 
1:17 PM
There's an auto-comment script available, and it has the option of sourcing the comments from another place..... and, that place could be the bot.....
So, you could edit the templates from here, and use them on the main site.
 
the problem is that it mostly works off the users in the chat room. but it also searches google and wiki. but I am sure that is because of a API
 
If I had the time ...... I could hack it like mad.
3
 
0
Q: Single consumer and single producer lock-free circular buffer in C++

UldisKI'm pretty new at multithreading. The code below is a simple implementation of a single consumer/single producer circular buffer that does not use any locking, that I wrote for fun. The question is, will this kind of container work in actual real world situation or would it crash miserably bec...

 
OK, I am off now for .... 8 hours ... behave yourselves.
5
 
later
 
1:27 PM
I hope the issues that make this code non-working get resolved, so you can edit this question into one that's on-topic for this site. Per our help center, code is ready for peer review when it's working as intended; this site isn't the right place to ask for debugging help. — Mat's Mug 6 secs ago
 
killing some new zombies
0
A: java.util.concurrent bounded resuable resource implementation

chillworldWelcome to Code Review. You have posted an very good quality post and that's why it takes so long to get an answer. I have 2 minor remarks to make. First : if (maxUsageCount < 0) throw new IllegalArgumentException(); You do this check 3 times, I have no problem with that. But what if your m...

 
8 hours gone?! Time to create chaos.
 
@Mat'sMug will kick you from here, and there are other users that will keep you on a relatively short leash on that....lol
4
 
^^ that ;)
anyone tried the official 2048 mobile app?
the "Time Trial" mode could use a code review I think.
and from what I could tell it's all JavaScript.
 
I suddenly got an idea of writing a program that can codereview other code. And itself.
 
1:42 PM
@skiwi don't reinvent the weel use sonar :D
 
@skiwi C# has that. It's called ReSharper ;)
 
lols
 
@SimonAndréForsberg The trick to learning Scala for most people is gradual immersion. Start out writing glorified Java and gradually learn all of the good stuff.
 
@Mat'sMug I have Advanced and Super Advnaced once on my tablet
on the one I am still in my first game
 
@skiwi Feeling a bit meta today?
 
1:54 PM
@Donald.McLean Perhaps
 
didn't put a vote to close cause I doesn't know on what to close
 
@Mat'sMug I recently installed the official 2048 app for Android, haven't tried it yet though. It is entirely written in JS, with Phonegap.
 
@SimonAndréForsberg IDK if it's just my phone, but Time Trial seems to sometimes ignore user input while tiles get generated, which can lead to frustration - until you understand that you have to "time" your moves with the tile generator. JS threading issue?
 
off to @home
 
(can JS and "threading issue" even be in the same sentence?)
@chillworld later!
 
1:59 PM
laters @all
 
Everytime I rewrite the same program the amount of code per file gets down and the amount of files get up
 
^^ that sounds like a good thing to me
 
Really, some things I've done in the past, make no sense.
 
JvR
I get that with most of the code I read after I've written it. "Dude, what was I thinking?"
 
2:03 PM
@Mat'sMug mine reaction :
@mohamagdy I don't see any difference with version 1 — chillworld 53 secs ago
 
I feel like quoting my own user profile here:
 
JvR
Doesn't matter if it's five years or five minutes ago.
 
> The more code I write, the more I can't stand looking at what I wrote 2 months ago...
8
 
JvR
Means we're learning? :)
 
yep
 
2:04 PM
We're learning from our terrible mistakes in life
 
a programmer that looks at his own code from 2 years ago and doesn't find anything weird going on, has stagnated for 2 years..
(or 5 minutes / 5 minutes in @JvR's case ;)
 
JvR
I have a question about a comment I saw: codereview.stackexchange.com/questions/48856/… . I feel it's a bit rude, but I'm not sure if it warrants me flagging it. Any advice?
 
I wouldn't classify it as rude myself
 
@JvR Nah, Boris is cool
 
JvR
That's why I didn't flag it. :p Could be just me.
 
2:08 PM
@JvR I napalm'd this question - congrats for your shiny new badge!
@JvR I think it's just fine, ..we've had snarkier monkey comments
 
@Mat'sMug If you phrased that as "anything that was open to improvement" instead of "anything weird going on" I'd agree. As-is, I can't though.
 
Monkey comments...?
 
JvR
Whee, badge! I'm a general with a big chest now.
8
 
Finally finished my tests for the operations between Point and Vector.
 
@JerryCoffin too late to edit, but that was my point indeed ;)
 
2:12 PM
@Morwenn Unit tests, fun fun.
 
I caught three errors that may have been there for years...
 
@SimonAndréForsberg I need expert input on an event bus
 
@Mat'sMug I've never seen any multithreaded JavaScript code earlier at least...
@skiwi I suppose I'm the expert?
2
 
@SimonAndréForsberg I suppose so... I had a review on it:
2
A: My EventBus system followup

abuzittin gillifircaThere are two bugs related to type system: Currently if all three parameter types, registerListener's first, and registered Consumer's and executeEvent's, it works as expected. @Test public void worksAsExpected() { String expected = "WORKS"; AtomicReference<String> actual = new AtomicRe...

Which advocates that a handler should count for all subclasses aswell
Is that the correct idea of an eventbus?
 
@skiwi I'll take a look a bit later
 
2:16 PM
okay, thanks in advance
I'm very tempted to write a real Java library for Tesseract (on top of existing native interfaces), but it's not what I am supposed to do.
 
0
Q: Javascript MVC application design

wigglywormI'm having difficulty grasping how to structure/architect a canvas application using an MVC like approach in Javascript. UI will be fairly fluid and animated, the games fairly simplistic but with heavy emphasis on tweening and animation. I get how MVC works in principle but not in practice. I've ...

 
2:32 PM
in Root Access, 12 secs ago, by Malachi
Root Access has just been Malachi'd
 
I like how the official 2048 mobile app counts your moves and clocks your game
unrelated, but the StackOverflow CR Community Ad isn't showing any signs of slowing down:
Score: 24
Created: Apr 28 at 2:03
Clicks per day: 23.22 (209 total)
Actually it is slowly slowing down, but it's still doing great.
 
Where is this ad you speak of ?
 
@skiwi I think it's up to you to decide how the event system should work in that regard. I have to agree with him about the bugs though.
 
@konjin It's everywhere
 
2:44 PM
@Mat'sMug That's a depressingly addictive game. I'm glad I don't have it installed anywhere.
4
 
@Donald.McLean I'm hoping to score a 8192 at some point in the near future ;)
 
Ah
I dont really use stackexchange much besides CodeReview and the occasional google results
 
same here
 
@SimonAndréForsberg How does yours work?
 
0
Q: Handle-based entity manager (that stores entities contiguously)

Vittorio RomeoI've created a generic data structure intended for game development entity management. It has some interesting properties: Entities are stored contiguously in an std::vector. Stored entities can be in one of three states: alive, dead, unused. Upon entity creation, a lightweight Handle object is...

0
Q: HTTP Client requests done right

OldCurmudgeonAs advised by many, I am using a client pool - specifically their PoolingHttpClientConnectionManager. For simplicity I wrap it in my own simple pool: public final class HttpClientPool { private static final Logger log = LoggerFactory.getLogger(HttpClientPool.class); // Single-element enum...

0
Q: Hmm, a thoughtful library

konijnI've been writing far too many routines in JavaScript that get a record from a an object or array based off a matching property, much like jQuery does with DOM elements. Since all the good names are taken, I called it Hmm. I went with the philosophy that if I don't need it yet, I wont provide fo...

0
Q: Planning Poker Using Lnockout

Graham WalshI am trying to build something similar to planning poker and am very new to knockout and was wondering if anyone could help me improve on my very crude start? this is what i have so far html Selected Card CSS .profile { width: 50px; height: 80px; color: #FFF; background: black; border: 1px ...

 
2:59 PM
@skiwi I don't handle subclasses. Mine works more like yours, except I believe without the bugs ^^ I'm aware that my eventbus system don't handle subclasses, but it's something I can live with.
 
@CaptainObvious this one can be interpreted as on-topic, or off-topic. OP isn't explicitly asking for debugging help, but is showing a stack trace for an exception that was thrown under high-load conditions. In other words, it works, but something's fishy.
 
00:00 - 15:0015:00 - 00:00

« first day (368 days earlier)      last day (3651 days later) »