« first day (931 days earlier)      last day (3085 days later) » 
00:00 - 19:0019:00 - 00:00

12:00 AM
RELOAD! There are 1625 unanswered questions (94.3807% answered)
Reviewing working code for quality and best practices is appropriate for Code Review StackExchange, not for StackOverflow. (That said, do read their help center documents for guidelines and scope about how to ask before posting there either). — Charles Duffy 35 secs ago
 
12:22 AM
1
Q: Tic-Tac-Toe AI Player

averythoughtfulguyI made a simple tic-tac-toe AI app, where the AI, who is always O, wins or ties. I just wanted some input on it, and wanted to know if there was any ways to improve it (not the functionality of it, but how efficient it is, cleaner ways to write stuff, better naming, etc.). I also don't know if I'...

0
Q: This code is a simple game that I created. Any bad habits I should fix?

WonkasWillyI'm currently running through LPTHW on my own, teaching myself some programming. But I've read that self-teaching can lead to learning bad programming habits. One of the exercises, I'm told to make a simple text-based game with the use of lists, functions, and modules. I believe I've covered tho...

 
How come suddenly many people are writing adventure games in Python? Some days ago they were solving Project Euler tasks, but these days they are doing adventure games... It's kind of like those games are in fashion just now! Weird...
 
12:44 AM
They go in bursts.
Sometimes DOS implementations are popular.
 
@holroy eh, you missed last year's invasion! ;-)
 
@Mat'sMug Some time back there was a little ripple of but this sounded more serious...
 
Also..
These days I seem to see lots of , too
 
Haven't seen that many in Python or C#, which I monitor the most...
 
Text adventure games are incredibly dumb.
There are a limited number of options, and only one path leads to success.
If I was building a game, I'd at least build several conditions that happen on a weighted random basis.
 
12:51 AM
Are you talking about choose-your-own-adventure text adventure games?
 
I'm talking about all the ones I see here, like the one above ^^
 
@Hosch250 That depends on the implementation, but most of them are somewhat limited, yes. They can be made intricate if coded properly. I recently looked a little on the esoteric programming language of Inform 7. That was kind of a fun and strange experience to read...
 
I'm sure they can be done good, but they are usually done by 'newbs'.
The more advanced people are usually interested in more complex topics.
 
Yeah, that sounds reasonable
 
Anyone interested in reviewing a database design I made?
Nevermind.
 
1:16 AM
@Hosch250 I was going to say I could, so let me know if you want me to
 
@Hosch250 Sorry, not just now... You better post a code review question. :-p
 
Sure. You already did, but I'm making some changes.
Hey, that isn't a bad idea!
 
That is, if it is working code, you know...
 
It is working SQL.
 
Yes that is a good idea indeed
I've done that a few times. Also, some folks in the DBA room I know are interested in DB-related questions on CR
 
1:17 AM
I got sick of having to re-enter the data every time I changed it, so I'm hardcoding a bunch of data into the same file that builds the database.
 
That's actually not unusual at all
 
Would it be a bad idea to post the populating data too, to show how it is used?
 
Especially in tables that are "outer" for example a PersonType table I would add in some values right away
 
It would make it easier to test, I think...
 
@Phrancis This is not real data, I just need data to show in my paper.
 
1:19 AM
@Hosch250 No it's actually a great idea. I'd post everything, so those of us that have access to a SQL database can just put it in and run it
 
So, I might as well just generate it once...
 
In my previous job, we had all changes to the database in source control, with a version tagging in the database it self. That way we could change any of our clients database using a sequential application of those changes. Those changes had code for both changing the data structure, and building of new data.
 
@CaptainObvious Deleted for gratuitous foul language.
 
Each change had both incremental changes, and decremental changes incorporated. So, that is a long winded way of saying that including both structural and informal data in a database file is not unheard of at all. It is very neccessary at times!
 
@200_success You are not going to give the OP a chance to edit their post?
 
1:23 AM
0
Q: Javascript breadth first search implementation (also includes functions for finding shortest path and number of connected components)

Daniel JacobsonI've been practicing my algorithms using The Algorithm Design Manual. I've decided to implement the breadth first search chapter using javascript. I also have a findShortestPath and a connectedComponents function that utilize my BFS. My BFS function accepts an adjacency list. CODE /* A Queue ob...

-1
Q: stopwatch help in java

thekonductorI am trying to make a stopwatch in java swing for class, but I can't get it to work. The text is not updating, but is passing the location address on RAM, I believe. I tried using a toString() method, but it doesn't work. import javax.swing.*; import java.awt.*; import java.awt.event.*; import ...

 
@CaptainObvious Buggy.
 
gone already
 
@CaptainObvious I left a comment saying that the post was off-topic, yet never VTC'd...
 
@SirPython OP can edit and flag to reinstate the question, or just post another question.
 
If this is functional code, your question might be more appropriate for code review. HTTP://cr.stackexchange.comClaies 7 secs ago
 
1:26 AM
@Duga Nice try on the URL.
 
It was an inappropriate recommendation anyway.
 
This would not be a good fit for Code Review, as there is no code to review. This would be too abstract for a code review and is really more of a design review. — Phrancis 47 secs ago
 
1:38 AM
I named one of my professors 'Anastasia'. Now I don't have a last name to suit the first name.
Anastasia Scott sounds good, but I'd like a slightly classier last name.
 
@AlessandroTeruzzi I learned this style of coding from my freshman programming class. — Andrew Tew Oct 10 at 2:07
 
Ever watched A Kiss for Corliss? I did a mental 'Holy Smokes', Dexter Franklin style, when I saw that.
The drawn-out kind.
 
2:05 AM
Anyone use Gmail regularly?
 
I do.
 
I do.
I mean, I set up my gmail inboxes on my phone, ..that counts, right?
 
I've used it for years but it's been giving me problems since October, I can't see any new emails. I wonder if it's just too full?
 
0
Q: Rock paper scissors AI issue

HautchI'm building a simple rock paper scissors game. It works fine, except for the fact that the game won't stop when comp_count reaches 3. I can't seem to understand why, since it works fine for player_count. Help me out please! from random import randint player_count = 0 comp_count = 0 def game()...

 
Have you used up all your allotted storage? (bottom left corner)
 
2:07 AM
Not been getting undeliverable responses sending to it, I just can't see the new emails in Gmail
> 11.86 GB (79%) of 15 GB used
I have quite a lot of stuff in Drive, I wonder if that is related
Guess it's all combined together to 12 GB or so
 
@Hosch250 What about Anastasia Rice, as suggested by answers.yahoo.com/question/index?qid=20090531183532AApzVu3
 
Ugh. I hate rice.
I like the name Heather Black.
Both are Scottish names, so this character can have Scottish origins.
And Bill Smith is nice, but it couldn't be a hero or a villain.
Adam Thompson could maybe be one.
 
What about Anastasia Blake, this time according to writingforums.org/threads/…...
 
Not so bad.
 
2:14 AM
How do you like Jack Pirate and Barb Wire? (Two of my students.)
 
On writing forums, someone suggested going a little sideways, and do Anastasia O'Grady
... or McGradey, if it is a professor responsible for grading students... :-p
 
That's a good one, but it doesn't suit the name.
 
Jack Pirate is kind of OK, but Barb Wire sounds to constructed, I think...
 
LOL.
 
Jack Pyrate? Barb Que?
/me is ducking...
Hmm... Maybe Anastasia Hale, which has a slight co-notation to Yale University?!
 
2:22 AM
How about Anastasia Moss?
I'm not trying to play around with Anastasia's name.
I like it too much.
 
Moss is the name of a town in Norway. Not a very popular town, that is. So for me that would be a no-go. I kind of like the Anastasia Hale. It has a nice ring to it, I think
 
McBride?
 
I thought you said not playing with it... McBribe, sound like a dishonest professor... :)
 
The girl is an American, so her name can be a bit cosmopolitan.
d, not b.
 
I know..
 
2:28 AM
I have a student of Scottish ancestry (Heather Black), a German (Helmut Ziegler), and a Scandinavian (Erik Bjornsen).
I suppose I'll be called racist if I don't stick a Muslim, an African, and a Chinese student in there too.
 
On writingforums link above one guy suggested: Anastasia Fatimah bint Tariq bin Khalid al-Fulan
 
That is one name I am NOT going to use!
 
HeHe... Good call...
 
I think I'll stick with Scott. It's kind of grown on to her.
 
Sounds good!
In which context are you using the names?
 
2:32 AM
That is a teacher. The other three are students.
 
Yeah, but is it a school paper, a novel, or ... ?
 
As are Jack Pirate and Barb Wire.
School paper for my database class.
If I ever write a novel, I wouldn't mind using Heather Black as the heroine.
I'll model her after the model wife (from my perspective), which I'm not planning on marrying.
In fact, I'm not planning on courting her either, simply because I'm not interested. I'd rather be free and alone.
(And no, I'm not interesting either, AFAIK.)
 
A model wife you wouldn't marry or court? That is kind of an anti-model, isn't it?
 
I'd court her if I was planning on courting anyone.
Thing is, though, I want to be a bit of a 'jolly swagsman' and 'waltz' the world with my 'matilda'.
 
Are you know in the novel, or in the real world?!
 
2:36 AM
I'm in the real world.
I was quoting from the song Waltzing Matilda.
 
I do believe that your ideal partner would be someone allowing you to be the best you can be, and which you could inspire to be the best of her capabilities. In that sense, both of you could both live in the waltz... (Which by the way is a fun song!)
 
0
Q: Let's add more [naming] to the blacklist

JamalI happened to see that naming was recreated and removed today. In the past, there was also high favorability towards burnination. Many other bad meta tags have already been blacklisted, so should we finally add this one as well?

 
Nah, I'm a bit of a roaming cowboy at heart. I don't want to settle down, and I couldn't ask a wife to come with.
 
Call me a dreamer, but maybe your ideal partner wouldn't like to settle down either and would love to tag along?!
 
Maybe. We'll see.
I'll let you know if I get married, if my wife doesn't mind.
Ever heard of Crocodile Dundee?
He got married in the end, so I guess just about anyone could.
 
2:41 AM
Good luck! And remember to enjoy life, and love your self, which will make it a lot easier for others to love you!
He's a strange fella, that Crocodile Dundee...
 
Eh, I don't want to be selfish.
 
There is a difference between being selfish, and loving one self in a good healthy way.
I do have hope for most (if not all) people, that there exists someone for them.
 
As long as you love your neighbors just as much, I guess it would be fine.
 
Yeah...
Oh well, the sun is closer to sunrise, than sunset, so I' think I need to find my bed...
Have a good night/day/...!
 
Night.
 
3:08 AM
@Hosch250 I thought Anastasia Scott had a somewhat familiar ring to it. And now I suddenly remembered why. In "Nothing Hill" with Julia Roberts and Hugh Grant, she plays Anna Scott... Just thought I should mention it. Good night!
 
Good night.
I've never seen that movie, so I don't know who in the world that is.
 
3:22 AM
0
Q: Simple neural-network simulation in C++ (Round 4)

dblissYou may want to take a look at Rounds 1, 2, and 3, though that isn't necessary for understanding what's below. The major change since Round 3 is that my code is much cleaner and I'm including profiling information here. Here's my script: #include "hansel.h" #include <deque> int main() { /...

0
Q: Text-based Tic Tac Toe with DRY and PEP-8

TigerhawkT3This is a basic Tic-Tac-Toe game with a minimal interface. The only concessions to ease of use are input validation (7 lines) and 1-indexed rows and columns (a few bytes). I've been trying to tighten it up while still maintaining readability and PEP-8 style. I'm pretty happy with most of it, exc...

 
Broken, I believe.
 
like, SO question
 
3:38 AM
Nice answer... except this isn't Stack Overflow, we don't fix OP's broken code here. The question is actually off-topic if the code isn't working as expected, as explained in our help center. Answering these questions is actually harmful, since OP needs to edit their question with working code to get their post back on track - and when they do that, then your answer loses its value and you have to edit it into an actual review... that can even be a rewrite if you're willing to put the effort, but it needs to explain what's going on and why, too. — Mat's Mug ♦ 27 secs ago
 
4:00 AM
possible answer invalidation by Phrancis on question by Phrancis: codereview.stackexchange.com/posts/111264/revisions
 
@Duga Shush
I might put in a feature request for @Duga, this is a bit annoying when one adds/removes "quote-block" code-blocks
 
5:02 AM
0
Q: Binnary representation has odd ones

MAGThe fn odd_ones(x: u32) -> bool function should return true when x contains a odd number of 1s. Assumption: x is 32 bit unsigned. Restriction: The code should contain a total of at most 12 arithmetic, bitwise and logical operations. Forbidden: Conditionals ,loops, function calls an...

 
5:36 AM
@TopinFrassi I finally answered it - gosh there's a lot to say about this code
and TTGTB
 
5:51 AM
0
Q: Simple pager in C

Anonymous ShadowI have written a simple pager in C. It works fine for most things, but I'd like to know how it can be improved. Specific things I'm looking for are if there are size and/or speed improvements to be made, as I have noticed that it sometimes performs slowly (but that might be my slow computer ;-), ...

 
 
1 hour later…
6:56 AM
(void) col; /* keep the compiler happy */
 
7:09 AM
@Mat'sMug excellent answer!
I just won my first bounty. I'm effing proud! :D
 
Grats!
 
7:28 AM
0
Q: Tkinter derived class Properties

R4PH43LProblem Set: Inheritance from tkinter classes has IMHO one huge disadvantage. You cannot use (like inheriting from object) the built-in Property. What I am currently doing (in at least most of my code) - if I do need Setters/Getters - is to code them out like: #!/usr/bin/python import ...

0
Q: ActiveMQ consumers and Object Message class or Builder. Check solution

Eugene G. Ustimenkoguys. I have a question about my solution with Active MQ message object. I have any number of Active MQ consumers: @JmsListener (destination = Destinations.ISSUE_ASSIGNED, containerFactory = JMS_LISTENER_CONTAINER_FACTORY) public void receiveOnAssigned (ActiveMQObjectMessage message) throws JMSE...

 
7:49 AM
If you are looking for a code review, you should post the code over on codereview.stackexchange.comhotzst 5 secs ago
@hotzst desiredYield[] = getYield() makes no sense and won't compile, so the question would be off-topic for Code Review in its current form. — 200_success 46 secs ago
 
8:30 AM
0
Q: Alteration of Rebol's SEND favouring To/CC/BCC fields for defining recipients

rgchrisI was looking for a way to better define email recipients along the lines of the To/CC/BCC convention. Although SYSTEM/STANDARD/EMAIL contains CC and BCC fields, they are not currently functional, see: "How to Add Addresses to the BCC Field Using Rebol's Send Function" http://stackoverflow.com/q...

 
8:59 AM
The second answer on that page correctly describes the behaviour I'm looking for. See: codereview.stackexchange.com/q/111395/46291rgchris 33 secs ago
 
9:21 AM
I've used this answer as a basis to modify the Rebol SEND function to better handle both CC and BCC fields. My tests thus far show it to work as described. — rgchris 8 secs ago
 
0
Q: Graph radius in Java - follow-up

coderoddeSee the previous and initial iteration. Terminology Given an undirected graph \$G = (V, E)\$, an eccentricity of a node \$u \in V\$, \$e(u)\$, is the maximum length (number of edges) of a shortest path from \$u\$ to the furthermost node from \$u\$. The graph radius is the smallest eccentricity ...

 
 
2 hours later…
11:07 AM
0
Q: Verify - if oblique line in matrix is equal

danaI wrote a program that finds out if matrix has 2 oblique lines that each oblique line has the same value. The lines does not have to be the same value. for example: for this example, output is false (there is only 1 oblique of 1,1,1) for this example, output is true (there is 2 oblique: 3,3,3 ...

 
11:20 AM
This is more of a code review question. You might be able to get it on-topic for SO if you highlight a specific part of your solution that you want different / are unhappy about. — MicroVirus 18 secs ago
 
11:38 AM
@Hosch250 I think @rolfl deserves a ping.
Oh, he already got one:
18 hours ago, by Mast
@rolfl New design possibly incoming.
 
0
Q: JWT - Simple API example

Thom Thom ThomI have created this fake API just because I want to learn how to use JWT. It is a simple unsigned token exchange with two methods call: login and adminPassword. I've used https://github.com/lcobucci/jwt as a JWT implementation. This is the server code (index.php): <?php // https://github.com/l...

 
11:52 AM
@Ludwik I was in Poznán seven years ago! On new year's 2009-2010 :) I have a feeling our design is in good hands.
 
12:05 PM
17 hours ago, by Ludwik
damn. i shouldn't curse.
^^ lol
 
12:17 PM
@SimonForsberg That is kind of like: "Shoot, now I lied for the first time..." It it's true, it is false, and if its false it is true...
 
0
Q: Ensuring non-expired token before every request

W.K.SI'm developing an iOS application where data is fetched from a third-party REST API. Each request must contain an authorization token. In order to implement this, I've written a fetchToken withCompletionBlock:(void (^)(ASToken*) token,NSError ** error) method in AppDelegate: -(void) fetchTokenW...

 
Monking
 
12:43 PM
Here is the codereview discussion for the commit introducing this code: codereview.appspot.com/3775048HectorJ 6 secs ago
 
Hey @SimonForsberg - I am lurking-ish.
 
1:12 PM
@Duga HeHe... That is not us, @Duga, that is an entirely different web site... Possibly reason for feature request?
@SimonForsberg, See ^^, should Duga be fixed when the a fully qualified domain does not point to Code Review?
 
Should be pretty easy to fix that it should be *.codereview.stackexchange.com if it's an url I think
 
Monking :-)
 
Zak
@DanPantry Monking
 
I have had sushi, I slept until half 11, my shiny new (and decidely not bent) debit card arrived... today is going to be a good day
And before you ask about the bent card... it didn't survive the washing machine very well
 
1:28 PM
@rolfl so am I. Just wanted to tell you that apparently we're gonna get a design, but it seems like you already know it
@holroy @Duga catches all comments that mentions "code review" or "codereview". It's hard filtering out those that does not lead to us.
 
Zak
@SimonForsberg IMO, cases where it's not mentioning us are so rare that it's not worth refining
 
@Zak that's my opinion too, which is why I haven't bothered doing anything about it
 
@SimonForsberg It would require an possible extra detection of a link, and then verifying the domain... But I do agree that possibly the benefit isn't high enough, as I've not seen that many false hits...
I just thought I should mention it, when seeing it now. :)
 
Given that its usually immediately apparent when its not us, I don't think it matters
 
@SimonForsberg Seems like someone of us could fix it
Haven't looked at the code recently in last months, but if it's a single method that takes a String as input then you could write unit tests for it, and theoretically you could not break anything else?
 
1:39 PM
any effort is too much effort for a feature like that
What if they write codereview.se?
Valid domain, means CR, will result in a false discard
 
1:59 PM
So it has started... I've now got 6 different Firefox windows open
 
@JeroenVannevel And that, people is the difference between a computer scientist, and a software engineer.
5
 
Crap... I'm both
 
@rolfl I guess I'm borderlining towards a computer scientist, then. I think I would have implemented that feature...
 
@holroy - personal story. I am part of a "specialist" team at IBM, where everyone is really, really smart, except me. I have a Commerce degree, just a batchelors. Pretty much everyone else is a PhD or masters - in math, computer science, or even things like physics.
The thing is, I get things done according to the 80/20 rule... mostly, and my stuff has rough edges.
 
@rolfl You can tell that by the fact that you cannot even spell bachelors properly ;)
 
2:06 PM
> I am part of a "specialist" team at IBM, where everyone is really, really smart, except me
You are very smart. For a monkey. ;-)
(I kid. Don't talk down on yourself :()
 
But, an 80% solution to a problem that's currently working now, is often much, much better than 0% available solution to 100% of the problem space.
4
 
So the others get to work 100% of their time on solving the even harder 20% of the solution?
 
@rolfl which is helpful, given that I'm trying to pput a project together now and I always fall down on getting sidetracked. :\
 
@DanPantry Do you get paid for it or hobby project? I find that matters much to me personally ^^
 
@skiwi hobby. I have no issues with paid projects because someone has already done all the planning for me and I just have to implement the solution.
 
2:10 PM
You should ask this on Code ReviewArc676 17 secs ago
 
@rolfl Are you working with algorithms a lot then? Or more with concrete implementation
 
It's more complicated than that - I am currently playing in a combined researchy/architecture/prototype space.
 
That at very least already sounds complicated
 
@skiwi I think "batchelors" was a nice spelling... Kind of implies they come in batches... Spoken from a guy which is "Master of Computer Science"... :-D
@rolfl Truth be told, that version of 80/20 can be a real advantage at some times. I'm kind of aiming for 100%, and know I'm capable to get close, so leaving something at 80% is actually a challenge for me.
So in the land of consultants, being able to solve the problem to such an extent that the customer is happy and content, but leaving out the work to get it towards the 100% mark, can be a good quality.
 
2:25 PM
@holroy - it's more than just the 80/20 rule for implementation.... it's also the 80.20 rule for design.
 
Do also remember the reciprocal rule, that the remaining 20% will take 80% of the time...
 
I am happy to start developing when I know about 80% of what the solution should be, and work on the things that I know need to be done. I can do a pretty good job of making that 80% PDG, and such, and, as you play with the 80%, the remaining 20% of the design falls in to place.
 
For me the problem arises, when I'm not alloted enough time to build stuff according to my standards, which then leaves me with no option but to turn in code I'm not satisifed with. That is not a good recipe for job satisfication. :(
 
The scientist-minded people want to have 100% of the design nailed down before they start working on things, and then, as they go, their code is 100% dedicated to only the design, and it is inflexible.
 
Ask this on Code Review and I'll answer it there. — vacawama 39 secs ago
 
2:29 PM
@rolfl That is not entirely true, but when starting with a loose design, I'm inclined to wanting to change the design whilst implementing. And when I encounter bad design, I do feel like refactoring it, even thought the problem at hand could be to fix something simple.
 
@rolfl I had to read the rest of the convo to realize it's a compliment
At least, I'm taking it as a compliment
In January I'll graduate with a bachelors in Applied Computer Science so it fits anyway
 
It's neither.... the world needs both the scientist, and the engineer.... so it's good.
The parable of the lazy-programmer holds in there somewhere too.
 
still taking it as a compliment
 
What about the lazy CS student?
 
You and your flattering ways
 
2:30 PM
You do need both, and both needs to be aware of the other type. If not you could get into various kind of problems... :(
 
I'm voting to close this question because it belongs on codereview.stackexchange.com — vacawama 6 secs ago
 
@holroy - real story, current-events, at work.... things I can talk about....
... is the discussion on "the appropriate language". The smart people want to use the right language for the job, the language they think they want to use is "new".
Their research indicates that it will be able to run fast, small, and make some of the things we need to do (the 1% of the hard stuff) a whole lot easier to implement
 
My second to last job, I was pushed to edge related to job satisfaction as they didn't want the better option, as the current option for they was good enough. That their solution was based on ancient history of bit fickling (and pre-windows design), didn't matter to them.
 
Last time I was within academic circles I learned Python 2. Because that's what they used, liked and got the job done in. They didn't care it wasn't new.
 
Oh, I see I have 100K ;-)
 
2:34 PM
@rolfl You've had that for a while ^^
 
@rolfl Congratulations on winning our race
 
Thanks .... :takes-a-bow:
 
@skiwi What is that number?!
 
The combined sum of my reputation on all SE sites.
 
@DanPantry side-tracked? procrastinating much? lack of motivation?
 
2:38 PM
@SimonForsberg I don't know what it is, frankly
I mean I sit down and try and focus on the idea to try and write some information down and I just can't focus on it clearly in my head (even without distractions)
I wrote this in the past 10 minutes so there's that ;-; but still
 
@DanPantry Well, seeing like you like Skyrim, you could always try Fallout 4 and never wonder about programming issues again
 
May 22 '14 at 17:00, by rolfl
@rolfl 35564 @skiwi 9321 - and the 100K race begins
 
@skiwi lol
 
@DanPantry sounds like you're describing Steam.
 
@SimonForsberg Sort of.
 
2:41 PM
@rolfl In my defense, I've got more rep than back then
 
In fact, "We can draw some of this information from things like the Steam API " is one of the articles
Steam does a lot of things right, but it doesn't do any of the things I mentioned there with regards to defining correlations between games.
 
@skiwi Me too lP
 
@rolfl You've reached 100k now? Congrats!
 
@DanPantry The problem is, you are trying to create something that would take months if not years to make and one that already kind of exists... Not trying to demotivate you, but no wonder you cannot find enough motivation to reach that goal
 
In my opinion Steam acts as more of a storefront with reviews on games. I'd like to take that one step further by definition relationships between those games and helping to build social groups around those games. The website itself is intended to have a focus on Steam integration.
 
2:42 PM
0
Q: Hash Function Implementation

user2662639Implementation of a hash function in java, haven't got round to dealing with collisions yet. I tried to use good code, refactored, descriptive variable names, nice syntax. My code must be efficient and extensible. Would be interested to know how you guys would improve. Three classes: TestHash...

0
Q: How to avoid violating the SRP? [Clean Code]

ravenNote: The code sample is written in c#, but that shouldn't matter. I've put c# as a tag because I can't find a more appropiate one. This is about the code structure. I'm reading Clean Code and trying to become a better programmer. I often find myself struggling to follow the Single Responsibili...

 
Site-wide, yeah.... I will need to start answering questions again, though, if I want 100K on CR.
 
@skiwi This happens with every project I come up with - not just specifically this one.
 
@DanPantry Start smaller
 
@DanPantry @DanPantry - not "start smaller", but "track smaller"
I recommend getting your own personal issue-tracker.... mantis, or bugzilla, or, if you want, use github, or something.
 
@vacawama thanks, sorry I didn't know there was a separate place on here for code reviews. I will add on there and close this question on here. — Nick89 13 secs ago
 
2:47 PM
Break big tasks down in to discrete steps, and give each of them a purpose.
 
To be clear, that was meant to be an incredibly large overview of the project as a whole.
It's an abstract, after all.
 
Then, have satisfaction as you check items off.
 
@skiwi how? The premise of the idea is that we link games from steam together using relationships based on friendship circles in the app. You can't get much smaller than that. ;-;
 
@DanPantry I really think you need something that you can show to others as working, that's smaller than that, I'm not claiming that I know how
(I'm having quite some difficulties with that stuff myself)
But have you started already? Is there anything stopping you?
 
@skiwi nothing stopping me other than the fact I get tripped up by, yes, procrastination
and decision paralysis
 
2:52 PM
"I will stop procrastinating... tomorrow."
3
 
Have you decided ona frameework, etc. already? Got some example app running?
 
@skiwi framework - node. nope, no example app
 
I guess you will need an example app and (Git(Hub)) Repository before you can do anything, right?
 
Yeah, I'm going to start on the example app
 
Hmmm, I just got (another) idea: Maybe create some site where you can share status updates (and most importantly, screenshots) of projects you are working on, sort of a social network for procrastinators?
 
2:55 PM
@skiwi Maybe later. ;-)
 
I know that there's blogging, but blogging seems quite a bit more involved than that ^^
How awesome would it be to hear from your fellow procrastinators that you are doing well and should not be procrastinating that much?
 
I would probably use that site as a form of procrastination
 
@skiwi Blogging is in fact, much easier than that ;-0
 
1
Q: Star Rating - is there a better way to code this? In Swift

Nick89So I needed a a star rating feature to appear in my app - it doesn't need to be interactive. I have my app connected to a database I've set up in Parse, and I've made a column for OurRatingof type Number, and I just set a number between 0.5 and 5. In my custom cell, I have 5 images which will d...

 
@Phrancis But for blogging your sentences need to be written quite professionally (I think), at least that seems to be a burdern to me
I can't just throw out my ramblings on a blog
 
3:03 PM
See that's where you are mistaken... it's nice if the writing is good, but not needed. Or, you can also use something that's already out there like say, imgur or Flickr.
 
@skiwi Like a combination of Facebook and GitHub?
 
@Mast Or maybe rather Instagram if you make it similar to posting pictures
InstaHub
GitGram
 
3:24 PM
@Cap'n O lots pf copy-pasta in that Swift code :)
 
0
Q: How can I make better the performance of this code?

Koray TugayThe code I have is here: /* Base Business Objects are considered to be same if they have the same businessKey ! */ public class DataDiffContainer<BO extends BaseBusinessObject> { private List<BO> insertList = new ArrayList<BO>(); private List<BO> updateList = new ArrayList<BO>(); p...

 
Nice title dude...
 
^^
 
Oh wow
 
0
Q: Reading values from a text file and print the meanvalue in c++

Dimitrios SHello i am trying to create a program that reads integer values from a txt file (negative,possitive) and then print the min/max value as well as the meanvalue.

 
Anyone else here shares my hate with LaTeX?
 
@skiwi Why the hate?
 
It never does what I want when writing algorithms ^^
 
3:47 PM
What do you mean what my code does? I explained it mostly in the question and the comments in the code? — Koray Tugay 1 min ago
Can anyone inform this guy? Or edit post... I'm on a phone
 
Don't know Latex. If I need a formatted document I usually just use LyX and then cross my fingers. Normally the result looks good enough, including source code samples and formulas.
 
I wish latex would just what it does without me having to do anything about it
 
I'm having enough trouble with the Algorithms class in itself already that I don't need LaTeX to also worry about
 
Can't you just RTFM? Is LaTex really that difficult?
 
@Mat'sMug you around? I'll answer your olap question but I need to leave soon
have some questions though
 
3:55 PM
If you're learning algorithms, don't learn another tool at the same time you're learning algorithms. Just use the tools you already know for now.
A plain text editor will work just fine for writing down your algorithms. Or MS Word or whatever.
 
@Phrancis It's like reading a manual where you ahve some pages from 2010, some from 2000 and some others even from 1980 and none of them really have any relation to eachother whatsoever
@Brandin Unfortunately that's not allowed when handing in homework, even on paper is strictly forbidden
 
Ah. That's crummy. Isn't there a SE site for LaTeX?
 
There is... But every solution in LaTeX creates at least three more new problems
They don't all occur instantly, but they are just waiting to kill you once you add som enew package
 
If it's just for a class, why do you need new packages? Just stick with the standard one's your prof requires.
It sounds like you're doing too much at once. Learn algorithms. And do the minimum latex required to complete the assignment. No more.
 
But it can't look like total crap
 
4:10 PM
Greetings
 
@Mat'sMug, answer posted, comment as you like but I won't be back until tomorrow
@Mat'sMug edited your price code example into it to make it clearer
REFRESH PLZ
:)
KTHXBYE
 
4:48 PM
0
Q: how to get the duplicate values from the integer array and print the no of occurrences of integers.

user90178how to get the duplicate values from the integer array and print the no of occurrences of integers. Can you please help me here i have tried and search many sites i did not get correct out put. particularly when value repeated in more than 2 times

 
@CaptainObvious HAMMERTIME
 
5:03 PM
User is not trying too hard
 
Jin
this room is so active :)
 
@Jin We try to have fun, in-between procrastinating doing work :)
 
@Jin What else did you expect? ;)
And woah, on graphicdesign.SE the copy text highlight color is customized?
 
0
Q: Depth first search implementation using Node.js

Daniel JacobsonI've been practicing my algorithms using The Algorithm Design Manual. I've decided to implement the depth first search section (5.8) using javascript. Note you can execute the code here if you dont have nodejs http://www.tutorialspoint.com/execute_nodejs_online.php. CODE var doDFS = function(gra...

 
5:06 PM
The 2nd monitor is always crowded
 
@skiwi What do you mean? Sounds like some CSS to me
Can even do it differently for each element
p {margin-bottom:50px;}
::selection {
    background: #FF0099;
    color: black;
    text-shadow: none;
}
I think
 
5:28 PM
0
Q: Handling state in actor

igxThe following Actor monitors file by getting events from watchservice actor that sends a message to the actor and notifies for event (create,modify or delete), would love to get and ideas to improve it. case object GetBulk case class ByteBulks(data:Map[String, Array[Byte]]) /** * companion o...

 
I'm voting to close this question as off-topic because it asks for code review of working code which is more fitting for codereview.stackexchange.compoke 49 secs ago
 
5:58 PM
Looks like @Duga actually parses the rendered HTML, rather than the source mark-up... see github
    int index = post.indexOf('<code>')
    while (index >= 0) {
        int endIndex = post.indexOf('</code>')
@Mat'sMug @Vogel612 ^^
I think that's actually simpler, as block-quoted code should be like <blockquote><code>hello</code></blockquote>
 
0
Q: Converting a mathematical algorithm into python code

arc_lupusI want to convert a mathematically described algorithm into a python program. The formula I want to calculate is $$N(A(z,t)) = i\gamma\left[1+\frac{1}{\omega_0}\frac{\partial}{\partial t}\right]\left((1-f)A(z,t)\cdot\vert A(z,t)\vert^2+f\cdot A(z,t)\cdot(h(t)*\vert A(z,t)\vert^2)\right)$$ The al...

 
Suddenly, a @Jin appears ;-) Hi Jin.
 
@CaptainObvious I was thinking for a second that someone wrote a transpiler that takes LaTeX code that describes an algorithm as input and produces working Python code
 
the hardest part will be: "Working Python code"
 
@CaptainObvious Busted.
 
6:07 PM
@rolfl lol
You've worked a lot with Linux servers right? What language would you use to automate things
I know there's Bash... But it's not exactly my first choice for more complicated things
 
0
Q: Permuting a typelist

BarryGiven a typelist, return a typelist of all the permutations of it. For example: using Types = typelist<char, int, double>; using Permutations = typelist< typelist<char, int, double>, typelist<char, double, int>, typelist<int, char, double>, typelist<int, double, char>, typelist<

 
Hello.
 
Jin
@rolfl hello! i'm excited about site's design. I"m sure Paweł will do a great job and give the community a nice design. he's been doing a lot of research
 
6:24 PM
I am please. My understanding is that you've been putting in a lot of work to make the guts of the sites more "pluggable", so that the design elements are easier to apply ... which makes sense... so let's hope it works our great!
 
Jin
@rolfl yeah. i've collected a lot of tech debt over the years with sites' css.. been cleaning it up for the past year.. now it's a lot easier for us to fix css bugs and launch new site designs. we're almost there!
 
what is the question or do you want just a code review? (in this case you might start by cleaning up a bit - for example Let a = 5.0 will not work (syntax error) and your indentation is way off — Carsten 27 secs ago
 
@Jin Are you sure you don't need a... Code Review?
 
Jin
@skiwi haha.. i probably do... i don't know about you, but i hate my past self with a passion..
if i could time travel back to 5 years ago i'd punch myself in the teeth for all the crappy code i wrote
 
5 years ago I didn't even know how to write Java, but I can assure you that my first code was not that nice to put it mildly ;)
 
6:33 PM
I think every developer somewhen thinks that
 
0
Q: Json String to List Convesion

passionateprogrammerI need to convert String in Json format to a List object and I am using below program to do it. public class JsonStringToListConversion { public static void main(String[] args) { String userProfile = "{\"name\":\"Arun\", Skills:[\"Java\",\"Spring\",\"hibernate\"]}"; JSONObje...

 
Somewhere in the past years I've worked as an intern software developer in a paperless office, only now I realize how bad it is to not write things down...
 
237
Q: Implement ```-style Markdown code blocks

Mathias BynensCurrently, Stack Exchange’s Markdown parser only allows four-space indents to represent code blocks: // some code // another line of code GitHub Flavored Markdown and other Markdown implementations allow for an alternative syntax, that doesn’t require indenting each code line: ``` // ...

3
I wish this ^^ would get implemented :|
6
 
Can we riot for that too?
Maybe @rolfl can start sending a subtle reminder every day ;-)
 
```
maybe
```
6
 
6:56 PM
I'm ready to post my SQL database definition.
@Phrancis Eh, CTRL-K is good enough, although that would be handy.
 
What about the ability to use tab without jumping to the end of the page?
 
That would be nice.
 
00:00 - 19:0019:00 - 00:00

« first day (931 days earlier)      last day (3085 days later) »