« first day (229 days earlier)      last day (3781 days later) » 
00:00 - 18:0018:00 - 00:00

12:09 AM
@Malachi I know PHP but I'm a bit too tired to look at it right now. I'll take a look tomorrow.
 
@SimonAndréForsberg I know enough to get me laughed at. so be prepared. it was nothing special, and I think I might have made up some syntax too while I was at it
 
12:48 AM
0
Q: Matrix of checkboxes - only 1 allowed in a row

user4035Task Create a matrix of checkboxes. The user must be able to select only 1 checkbox in a row or unselect all of them. Solution <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" > <script type="text/javascript"> function switch_che...

 
1:32 AM
This is a security random announcement. It is now shortly more than one month since I joined this chat room.
4
 
Congrats. Expecting a cake? :P
 
@Jamal I'm expecting a donut, and a star.
At least I got the star.
 
Donuts are fun. We hate fun.
2
 
0
Q: Ajax, Creating <select> element and append data to it

SrleSo i made following and have few questions: Do i have some (big) mistakes in this approach? (bad practices, 'this code is trash'...) 1.1 If i do can you suggest what to fix. Are appended element created in good way? Code in success function seems to be a little long, anyway to refactoring? I w...

 
@Jamal Donuts are tasty. I like tasty.
 
1:42 AM
Tasty is also fun. We hate fun.
 
@Jamal But but... @retailcoder said that we like fun!
 
Retailcode is wrong. We hate wrong. No, wait. We only hate fun. But it doesn't fit here. Cannot compute. Cannot compute. explodes
 
I expected you to say something like "Retailcoder is fun. We hate fun" (No offense, @retailcoder!)
2
Night folks
 
Night!
 
@SimonAndréForsberg Good night.
 
2:01 AM
@Jamal what's wrong with donuts?
 
Nothing is. ;-)
 
2:44 AM
0
Q: code correctness

user56258$user_search = esc_attr($_POST['city']); global $wpdb; global $user_search; $address_table = $wpdb->prefix . "address_table"; $query = $wpdb->get_col('SELECT city FROM ' . $address_table . 'WHERE city = ' . $user_search ); print_r($query); I have this code set up to pul...

 
Great title.
 
I fixed it. ;-) It just needs the appropriate language tag.
 
Looks like some form of MySQL.
 
If you're unsure, someone else can take a look at it.
 
Ladies and Gentlemen, if you would allow me to point you to the new #2 on the leaderboard .......
 
2:58 AM
...............
Moderating is more important than hates anyway. :-) Let him have his hats.
 
(hey, I believe I'm the first on CR to get the Ghost of Winterbash past ... and, since I have not got Chuck Yaeger yet (and don't know how), then I figure you guys can wonder about my pretty mask.
 
ok that's it. I'm going on a hat-hunting mission.
 
Secret hats are cool when you have em, and suck when you don't .... ;-)
 
And I'll stick to what I do best: editing.
3
 
@Jamal did you vacuum-cleanup or another mod did?
4
Q: Which pattern to choose for passing alerts from service method back to user

AnilConsidering code sample below, which approach of service method design would you prefer and why? The one used in SaveOrder1 or the one in SaveOrder2 method? UPDATE: To be clear, I'm not talking about web service here, but application-type-agnostic service class from my business logic layer. I ma...

(comments on my answer)
^^ that question should be closed IMHO
 
3:11 AM
@retailcoder: In what way? There are no deleted comments on the question.
 
Could they have been vaporized?
If flagged as offensive, for instance?
 
Even flagged comments would show up in the history. Anyway, I do wish it was flagged for migration instead of just having it closed. I can't quite tell if it was "moved" so SO.
 
The user doesn't seem to have a recent similar question on SO.
 
Then again, it does sound opinion-based.
 
I know, and I can't re-[vote-to-close]. We reopened that one too fast.
 
3:22 AM
What is the benefit of closing it? It has answers, they appear to be good (lots of up-votes). What's the problem?
 
Well, it can still be reworded to not sound opinion-based.
 
@rolfl It's off-topic and could be used as an argument in future meta-discussions
@Jamal put on your Florence Nightingale hat and go ahead!
 
Okay. Also, @retailcoder, this didn't quite help move things along:
Well this is a fairly good answer, all answers here are trying to tell you there's more to solve than just what you think is your problem. Take it or leave it, but stop bitching at everyone that's trying to help you. Again, this question is hardly a good fit for this site, so be happy+thankful to be answered. — retailcoder yesterday
 
Oh darn, it's these comments I was talking about!!
 
Ah. Yeah, they were never deleted. I can do so anyway, or just edit them if they help fit in with the OP's decision to go elsewhere.
 
3:27 AM
I... lost my nerve.
 
Actually, I'll just delete them and clean up everything else. I'll keep it open as well since, after an edit, it can work as a proper best-practice question.
And no need to worry too much, @retailcoder. It happens (if you recall, I sort of did the same thing with that invalidating-answer user). It's good that you calmed down in the next comment, though.
 
@retailcoder Don't worry, it happens to all of us. I almost lost it to that one guy that answered my question and then downvoted the other great answers he "borrowed" some ideas from.
Just remember to be diplomatic about things.
 
Yeah, I try to be as much as possible. But some users just come here with the wrong expectations, and don't even bother reading through the help/on-topic page...
You earned 'Florence Nightingale' on Code Review! :)
 
0
Q: What is the better way to organize an python project

pocI have some questions to ask how to organize python project better. Where to put your unit tests scripts? Where to put your init script ? How to show your module version ? Here is my project structure (I built it by the module https://pypi.python.org/pypi/modern-package-template) . ├── HACKI...

 
Now I just need to spend 40 votes (how hard is that??!!) and I'll beat @rolfl without funky-looking fancypants sekrit hatz :)
 
3:34 AM
True. Even then, it could be hard to interpret it. That's also why the established users should help uphold the rules, thereby limiting moderator intervention. We need that if we're going to graduate.
 
I agree. Still the question should be closed.
@rolfl @Jamal there's a new #2 in town!! winterbash2013.stackexchange.com/leaderboard/…
 
Yet, my profile says I have 16 hats...
 
ugh
freakin' cache
 
@retailcoder You need to spend 40 votes?
Have at it.
:P
 
@syb0rg yeah, oddly the day I hit the vote cap 3 of my [down]votes got lost through deletion I guess, so my vote count said 37. It's the only explanation I can come up with for not yet having the vote-cap hat.
Daily vote limit reached - profile says 40 votes today. Awaiting hat.
 
3:52 AM
Interesting. Apparently in '11, adding in code from the OP's link was allowed. Jeff Atwood did this in revision 2:
 
...3 minutes after closing the question??
 
@Jamal I've done that before, did it used to not be allowed?
 
Apparently it was back then. Also, wow, a blast from the past. Apparently this was back when sepp2k was still a regular user. :P
 
Yeah, his edit was suggested :)
0
Q: What is the better way to organize a Python project?

pocI have some questions to ask on how to better organize a Python project: Where to put your unit tests scripts? Where to put your init script? How to show your module version? Here is my project structure (I built it by this module): . ├── HACKING.txt ├── MANIFEST.in ├── NEWS.txt ├── README.r...

^^ opinion-based
haha 2 more hats!!
 
I forgot to fix the grammar in the title? :/
1500+ edits or so across multiple SE sites, and I'm still no Ernest Hemingway. :-P
3
 
3:57 AM
Now I'm #2. Alone.
60-some more hats and we'll beat EL&U!!
 
Well, there is one for earning Revival and another for Necromancer.
 
Yeah, where was WinterBash when I chained up 10 revival badges??!
11 actually
 
Wow. MSO has a tag...
 
@Jamal do you have enough rep on MSO to see vote counts?
 
Nope. I can hardly do anything now.
 
4:09 AM
(and how did you just earn another 2 hats!!)
 
Yeah, I still need another 500 for vote counts. Not sure how I'll get there while avoiding downvotes, though.
 
I need to see the vote counts on the meta-concussion contest.
 
0
Q: Python - newbie code review - batch rename flac files

baldurmenThis is my first real program in python (and my first real program) and I would like to have input by some more advanced programmers on the code, on the writing style and on the amount of comments (is it clear enough?). new_name(scheme) does seems a bit bloated to me, but I can't figure out how ...

 
Oh, I now know how to earn the unicorn hat!
 
@retailcoder: Beat me to the edit. ;-)
 
4:18 AM
@syb0rg yeah, right
 
9
A: I (Don't) See Your Point: How do I earn this unicorn hat?

AntonyI just got this hat without much activity on SO. Judging form Gilles' idea, I checked my meta activity and found that someone just upvoted one of my comments, and now I have: So this hat is like the meta equivalent of Peanut Gallery. Given the unicorn look of the hat, and most of the people I ...

 
@Jamal I tried real hard :)
2
 
Starred because it sounds hilarious without context. :-)
 
^^^ Starred to provide starring context
86 more views on the CoD post and I'll earn a [badge:popular-question] :)
 
It definitely is beating this:
22
Q: Vote Early, Vote Often

YannisLack of voting has already been identified as an issue that prevents the site from graduating. I'm shamelessly stealing this post from Meta Biblical Hermeneutics, hoping it will inspire all of us to be a bit more active with our votes. Enjoy! And vote! I cannot state this strongly enough. Voti...

 
4:27 AM
@Jamal I remember a comment that linked to that post, calling it a "previous attempt"
 
Me, too. I'm still not sure if it has helped any, though. But, judging on the votes given to many of you, things seem to be improving. Plus, svick is only a few upvotes away from 10K.
 
uh, what do you mean, not sure if it has helped any? 93% answered would have been achieved anyway?
 
Back then, I mean. I think the OP even made a note about that, but it may have been elsewhere.
 
oh that one
and yeah, 9 votes away from 10K. And 200_Success went from ~4500 to ~7K since
and @rolfl and @SimonAndréForsberg are making us look like lazy monkeys
 
But yes, I can see how it has improved recently. Many of you have recently started posting a lot of answers, and they've already received a lot of votes. You all are above 2K, too. That's a great start. It took me a while to get that far, but that's just from my skills.
 
4:33 AM
Well, you are ..... NOT ...... monkeys
lazy, or otherwise!
 
@rolfl no, I'm a bird right now
 
But, I'm a moderator, so I best focus on that, unless there's nothing else to attend to.
 
@rolfl I'm a bounty hunter right now.
 
And I'm ....... almost dead on my feet again ... crap I'm tired.
 
I think in the past couple months, we have redefined CR's voting scheme, and how hard it is to earn rep here. Let's just keep this direction and we're headed the right way.
 
4:35 AM
rolfl, your hat looks terrifying on that monkey. :/
 
@retailcoder ... and how hard it is to earn rep here .... is that serious or sarcastic
 
@rolfl I'm sure it's documented somewhere. Dead serious.
 
Funny, I consider it to be relatively easy compared to SO.
 
@rolfl And veeeeeeeeeeeeeeeeeeeeeeeery easy compared to Raspberry Pi.
Holy crap it's hard to get votes there.
 
^^ that's it - the more active the community, the easier it gets.
 
4:37 AM
No, SO is tooo active.
 
Yet, I still have a feeling the "this site may not be a good fit for the Q&A format" thing that determines graduation may hit us. Well, it wasn't told to us specifically, but it still worries me.
 
On SO you have to answer fast, or you're out of luck. You need to play the numbers games..... get in fast, answer a lot of questions, and get 5-up 2-down if you're lucky.
 
Just a friendly notice, the answer ratio is down a bit at 1.8 answers per question
1064
Code Reviewcodereview.stackexchange.com

Beta Q&A site for feedback on projects you're working on, by sharing your code with fellow programmers and getting extensive feedback/review of best practices, design pattern usage, application UI, security, etc.

Currently in public beta.

 
If you answer more than 10 minutes after an SO question is asked, you will only score the up-vote of the asker, and, if you're lucky, an accept. Once the question has more than 1 answer on SO, no-one else looks at the answers to upvote them.
 
@rolfl: I can barely play that game and have only earned a few upvotes on answers.
 
4:40 AM
@rolfl The criticism over there is like none other either.
 
@rolfl that's SO typical (pun intended)
 
Yet, this was somehow upvoted by a random passer-by:
1
A: How to REMOVE the splitting of text (output) in c++?

JamalThe only thing I can think of is changing the size of the terminal window. To do this: right-click on the status bar > Properties > Layout > Window Size > increase width. This may not be what you want, but it may help a bit. Of course, this is also limited by the size of your monitor.

 
Exactly.... so, to get upvotes there yo need to 'ambush' questions.
here, you can take your time, formulate a good answer, and weeks later you are getitng drive-by-upvotes.
 
True. I think we're different from SO in terms of "culture." We don't like shotgunning answers, but they do. They don't like slowly working on an answer, but we do.
 
^^ Ahem. You skipped the part about weeks later you make a puny edit, brings your post back up onto the front page, and you are getting drive-by-upvotes
 
4:42 AM
Well, admittedly, that helped....
but, in general, I can expect up to 50 +rep a day from stuff older than a day.
and that's with only answering 2 or three questions a day.
 
We're like the anti-SO - they want broken code, we want our code working. They want fast/good answers, we want... good answers.
 
At least we both don't tolerate link-only answers. Those just annoy me.
 
My SO question+answer about implementing String.Format() in VB6, got most of its upvotes from passers-by, possibly coming from Google.
 
I am so tired I am making stupid mistakes, but, I am so close to getting it right... but it's like I am aproaching success asymptotically
 
@rolfl like, every step you make brings you one step closer to the horizon?
 
4:46 AM
I remember someone on MSO saying that one of the greatest delights is getting a random upvote on an answer. I couldn't agree more. :-)
 
yup
 
Build the code, copy to the server stop the three processes, replace the jars, start the servers, record the logs...... That's all I have to do, but I have not managed that step once the first-time in the past couple of hours.
 
Good night all!
 
cheers.
 
I'm gone too
'night @syb0rg
 
4:48 AM
cheers.
 
I know someone will beat me to this edit:
0
Q: I did pagination program in simple way,for the same program i like to modify the code with div tags ,can anybody guide me,Thanks in advance

user3107484 1)index.jsp. <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <body> <% response.sendRedirect("SportApi?len=5"); %> </body> </html> 2)SportApi.java. protected void processRequest(HttpServletRequest request, HttpServletResponse response) thr...

But I'm too tired anyway.
 
Oh my..
 
SO ... no problem.
 
Watch: someone will fix the formatting but not the title.
 
I just voted to close - unclear what he's asking ;-)
put on my SO hat ....
 
4:52 AM
flagged
(can't vote to close on SO)
 
I wish I could find one of the biggest edits I've made on CR. I even received a compliment from Yannis.
 
Ok now I'm gone. for real. ciao!
 
Just noticed, the closed queue on SO is < 100K again.
Hats helped there, I am sure.
 
@Jamal it just hit me - your profile is showing 16 hats, but 2 of them weren't earned on CR, so the CR.WB2013 Leaderboard is showing 14 hats for you, which means I can stop waiting for the cache to update and be assured to sleep as #2 with 16 hats :)
 
Post edited.
Or suggested.
 
5:34 AM
0
Q: How To Combined Numerous Queries

Dizzy49I have about 15 queries I am using to get some year end numbers for a report. I am trying to figure out if I can combine them all. I have a query that gives me a total of all paid invoices: $sql = "SELECT SUM( total ) AS total FROM `tblinvoices` WHERE `datepaid` BETWEEN '$start...

 
 
1 hour later…
6:47 AM
0
Q: Ruby Sudoku solver

David HarknessThis week's weekend challenge #3 seemed like a great opportunity to learn Ruby! Unfortunately, my workload and looming vacation did not cooperate. :( The puzzle will make forced moves automatically, but I was hoping to implement rules such as Naked Pairs before resorting to brute force. But ther...

 
7:24 AM
0
Q: Review my PHP class?

ElvisLikeBearI've inherited a class in a project which is purposed to execute a function that exists in POST data from a specified class. I've tried to clean this up as much as possible as well as secure it against SQL injection but I'm wondering if I could have done a better job or written this better. Any a...

 
 
3 hours later…
9:56 AM
0
Q: Is this a correct way to populate my views in android application?

user3107388I wrote these classes and I would like to know if this is a correct way. I created a new Project with Blank activity and "Scrollable Tabs + Swipe" as Navigation type. My main activity: public class MyMainActvity extends FragmentActivity { private static String url = "http://www.myurl.it"; sta...

0
Q: How can I automate the process of code review

theghostofcI have a team that works on multiple technologies. I want to know how can I automate the process of code review for .Net, .Net MVC, Python, PHP, Drupal and HTML5/CSS with JavaScript. I have read about and have used some tools like StyleCop/FxCop for .Net and PHP Code Sniffer and likes for PHP an...

 
10:34 AM
0
Q: C++ console application: Universal File Duplicator (problems!)

ThomasGreetings from Austria! I want to make a simple Universal-File-Duplicator. (Example: make 125 duplicates of one file) my problems: I tested the program with .XPS files and it worked BUT it corrupted the file. The XPS-Viewer couldn't read it anymore! When I duplicate a simple .TXT file it is a...

0
Q: Inserting interval into a collection

NikThe task is fairly simple. I want to create a collection of intervals and implement an Add method which would insert new intervals to the collection and merge overlapping ones. I would also like this method to somehow tell me which parts of the added interval were not in the collection before add...

 
10:52 AM
0
Q: Structure of API wrapper

StromgrenI'm building an API wrapper for a bookkeeping SOAP API. I have some questions regarding bast practice for structure of the wrapper and for error handling. For now i've structured it like this: EconClient.php class EconClient { public function __construct() { $wsdlUrl = 'htt...

 
 
2 hours later…
12:28 PM
0
Q: Idiomatic clojure code in a markdown parser

Dominic KexelSome time ago I created a markdown parser in clojure and I would like to get some feedback, since I'm a clojure noob in the first place (is the code understandable?/is it idiomatic?/can some things be improved?). So I'm looking for feedback on best practices and design pattern usage (performanc...

 
12:53 PM
0
Q: Servlet for querrying database on some high-loaded system

JohnWhat should the code do: Process client HTML requests, querry database and return the answer in XML.Working with a high load. I need to know how can it be optimized. Is something terribly wrong with this code? In data: Html-session, mac-address (in form of GET argument). Out data: Xml (session_...

 
1:15 PM
Good Morning!!
(anyone here?)
 
no, no-one here.
 
oh well, hi there anyway!
 
@retailcoder For once I agree with you. I slept horribly this night, woke up one hour ago... -.-
 
OOOPS
@syb0rg As @Jamal didn't answer your question exactly (as far as I can tell), seems like I have to. We avoid pasting in the code for the user since code on CR is CC-wiki. We technically don't have the licensing right to take their code, where-ever it is posted, and put it here. I believe there's a CR meta-question about this somewhere.
 
1:30 PM
0
Q: Simple command line tool to query database. Need code optimized

Johnpublic class ConsoleQuery { public static void main(String[] args) throws SQLException { if (args.length == 0) { System.out.println("You must specify name"); return; } String name = args[0]; Map < String, Object > device = getDeviceByNam...

 
1:42 PM
0
Q: server.class.php not working at all!

Matthew Colemanhelp! so I've bought a wordpress theme from someone and the creater is not willing to help in fixing his coding! im trying to get my website to show the stats of the minecraft server for me. the code for the server.class.php is as follows; <?php /** * * @Třída serveru */ class Server...

 
Zombie down!
0
A: Injecting SelectList objects into ViewData to enable using EditorFor on dropdown based properties?

retailcoderI'm assuming this code hasn't been reviewed yet because it's... beautiful - and I'm still searching for a better word. I mean, wow that's clever, I want that!! The only thing I can see here, is in the View method: protected override ViewResult View(string viewName, string masterName, object mo...

 
2:23 PM
(removed)
 
I see that @retailcoder is not a Defender of the Realm as well
@SimonAndréForsberg did you happen to look at that PHP question?
I am really curious about the last part of my answer.
3
A: Need help optimizing PHP/MySQL code snippet

Malachiyou might want to write it like this $total_query_raw = "SELECT SUM( total ) AS total FROM `tblinvoices` WHERE `datepaid` BETWEEN '$start_date 00:00:00' AND '$end_date 23:59:59'"; $total_query = mysqli_query($link...

 
@Malachi not?
now!
Yay! I'm an Archeologist too now!
 
0
Q: XNA Game improve our code?

xoxo_twDo you guys have any hints of how we can improve our code ? Heres a link to the source code : https://github.com/z3poxx/XNA_Projekt_v2/tree/master/WindowsSpel/XNA_ProjektArbete Its a space shoot em up developed using xna 4.0 framework.

0
Q: multiple returns in a method or one return

MaximusI have a method which returns Array. Array can contain values or can be empty. Here is the code: function getCustomerIds() { //this declaration is at the top to inform about returning value of the method; I don't declare variables at the top var customerIds = []; var linkedContact = ...

 
@SimonAndréForsberg coming at you! winterbash2013.stackexchange.com/leaderboard/…
@StackExchange link-only close-vote in
 
flac-strike (something like a carpet bomb):
2
Q: Batch rename flac files

baldurmenThis is my first real program in python (and my first real program) and I would like to have input by some more advanced programmers on the code, on the writing style and on the amount of comments (is it clear enough?). new_name(scheme) does seems a bit bloated to me, but I can't figure out how ...

 
2:36 PM
0
Q: StackExchange clone: where should I add my indexes?

HopstreamI'm creating an open source stack exchange clone and the following is my schema. What should I add indexes on for it to be optimal? Note: Rails auto adds an id column so the schema below doesn't list that explicitly for each table. create_table "comments", force: true do |t| t.integer "p...

 
@rolfl wow Gareth's answer actually deserves a bounty!
How is anyone going to get Conspiracy Theorist on this site...
 
@retailcoder what do you mean "not?"?
 
I see that @retailcoder is not a Defender of the Realm as well
 
0
Q: Need help optimizing a ruby code

izomorphiusI read this post on codeforces(essentially we heap sort 10 000 000 values). I am really surprised why does ruby perform that badly for this task. I will copy paste the code that Mike Mirzayanov used for the ruby version of the task but you can also find it where he posted it: N = 10000000.freeze...

 
@Malachi the XNA post, you downvoted but didn't put in a close vote?
 
2:49 PM
@retailcoder my bad, supposed to be now stupid fingers.
@retailcoder yeah I did
 
@Malachi monkey fingers ;)
Put yourself in the reviewers' shoes, would you spend 3-4 hours (or more!) to review an entire project just to get a couple upvotes and maybe a green tick? Break it down in multiple, digestible posts and I'm sure you'll get it reviewed - we love reviewing code, and you're at the best possible place to get your code reviewed. You can post a bunch of related classes and post a question with a title like "Pursuing the player, could this AI code get any cleaner?" - for example. — retailcoder 4 mins ago
@tomdemuyt hello!
 
I am still curious about my PHP answer and Declaring & assigning the variable inside the if statement condition.
 
PHP + me = mess
 
@Malachi Nope, sorry. Haven't gotten around to that yet.
 
Hi! Code that compiles isn't necessarily working code: your question seems to be asking for assistance in finding a resolution to known issues, which is outside the scope of this site. — retailcoder 1 min ago
 
2:59 PM
Person posts broken question, does not like my answer ... fool:
-1
A: StackExchange clone: where should I add my indexes?

rolflLet's go though a few things here... you do not have any primary keys on your database. Primary keys are part of the database's referential integrity, and ensure that you and your programs do the 'right thing'. Additionally, primary keys are implemented as an index, so they will ensure that pri...

 
Ooh somebody picked on the wrong monkey!
 
Given there's only m and one other monkey, probably ... (the other monkey looks prettier).
 
Wait, we're Dec.20?? I just got a random hat and AFAIK we're the 19th right?
 
@retailcoder yeah, it's 19th still
 
Ugh. I should have searched MSO before posting.
 
3:07 PM
Pay it forard?
 
@rolfl Technically the question wasn't broken, just aimed at rails developers. I also had no idea that "rails auto adds the primary keys on each table". But once we know that, your answer isn't providing much anymore.
 
@SimonAndréForsberg - you may be right ..... but, something in me hates deleting things... and now the question is actually good so it was worth something.
 
@rolfl We can give you two more downvotes and then you can delete it to get peer pressure badge.
A Swede, a Swede! This guy is a Swede!
-1
Q: XNA Game improve our code?

xoxo_twDo you guys have any hints of how we can improve our code ? Heres a link to the source code : https://github.com/z3poxx/XNA_Projekt_v2/tree/master/WindowsSpel/XNA_ProjektArbete Its a space shoot em up developed using xna 4.0 framework.

four more reputation and I will pass @Jamal
 
0
A: StackExchange clone: where should I add my indexes?

MalachiFirst things is first. When you create a database, you only do it once, or you script it out and execute in the SQL database itself. I wouldn't use ruby to create the SQL for you. it seems illogical to me that you would create the tables on the database in a language other than SQL. That bein...

@rolfl how did you get ghost of winterbash past? I participated last year
 
44
Q: Stack Overflow is getting a place of its own

Tiny TimWe've grown considerably as a network since the days of the original trilogy, when the prospect of growing into a network of over 100 thriving Q&A sites was a distant glimmer in a cloudy night sky. Today, Stack Overflow continues to graciously host discussions about the entire network on its extr...

^^ felt like sharing. this means in 6-8 weeks we no longer post non-SO meta on MSO, will be on MSE :)
 
3:20 PM
@retailcoder That was about time, really. I've found it so confusing that MSO is the same as MSE
2
 
Friggin finally.FEichinger 5 mins ago
I'm surprised it took this long to decide to do this. — Powerlord 2 mins ago
 
@rolfl so should I have your back on that answer to the Ruby SQL? or should I send you down the river?
we need to get @ruds in here talking, says he is a software engineer from google! that is almost as cool as @rolfl cakes working on.... (dang it I forgot it's name)... oh yeah Watson
 
Yay! I got Peanut Gallery!
 
@SimonAndréForsberg Have a look at it now .... now who looks like the fool ;-)
 
I'm #1 :) uh... darn cache
 
3:32 PM
@Malachi What's wrong with my answer?
@Malachi Sekrit is Sekrit!
 
nice target headshot:
0
A: Inserting interval into a collection

BobbyUnless necessary you should consider making your Interval immutable by making the sets private. It's easier to deal with such "value containers" if they're immutable (see Point, DateTime, etc.). Also at the moment you can break your collection by doing the following (also it's non obvious what h...

 
@retailcoder what is peanut gallery?
 
@rolfl i just saw your answer. you just had to one up me huh? lol jk good answer
 
@Malachi - just saw your edits .... they're good ;-)
 
3:38 PM
@rolfl & @SimonAndréForsberg : you're officially not new users anymore: codereview.stackexchange.com/users?tab=newusers
 
@rolfl I was in the middle of an edit when you edited too...lol i had to start over....lol
@SimonAndréForsberg i know what you mean about it not being nice.....
 
@retailcoder Yeah I noticed that a couple of days ago. It's about time I guess
@Malachi Yeah I don't like PHP and JavaScript much... I more prefer the good old compiler having it's say first. That reduces the number of bugs quite a lot.
 
@SimonAndréForsberg well it doesn't help that browsers interpret things differently from one browser to the next. PHP is better because it is run at the server level and not the client level, but it's just weird letting you create variables on the fly like that. (kind of Dangerous)
 
@Malachi indeed!
 
3:58 PM
@Malachi When I asked a senior dev what PHP was all about, he said "any idiot can code PHP."
2
 
@retailcoder pretty much.
 
That's why I never bothered with it. I'll never work for Facebook I guess.
 
@retailcoder I don't think that facebook uses PHP.....i could be wrong though
 
it does it was the last time I logged in, ...months ago.
 
0
Q: Need help optimizing a ruby code

izomorphiusI read this post on codeforces(essentially we heap sort 10 000 000 values). I am really surprised why does ruby perform that badly for this task. I will copy paste the code that Mike Mirzayanov used for the ruby version of the task but you can also find it where he posted it: N = 10000000.freeze...

not the OP's Code
 
4:14 PM
any JavaScript people in here?
 
@Malachi Up to a point. What's the question?
 
@Donald.McLean i posted an answer, but I am editing in more answer, I will post it in a second
@Donald.McLean
0
A: multiple returns in a method or one return

Malachione thing that you can do to shorten up this code is instead of this: var linkedContact = getLinkedContacts(this); if (linkedContact === null) { return []; } var linkedResource = getLinkedResources(linkedContact); if (linkedResource === null) { return []; ...

does that make sense?
 
Not necessarily. It may be that trying that second call with a null would produce an error.
The "[]" form is a Javascript shortcut for "new Array()".
 
So the OP should be returning the empty array he's already created instead of allocating a new one
 
@Malachi Btw, that question is an excellent example why using an Option monad is much more expressive than nulls – in languages that have this option.
 
4:23 PM
Hi @GarethRees!!
 
Hello!
I have a suggestion:
 
@retailcoder Probably.
 
Drink lots of water?
 
Weekend challenge #4 should be the featured post, not the index
 
@Jamal ^^^^
 
4:25 PM
0
Q: Why does my code repeat the user input? (Rock paper scissors)

dan int convChoice = 0; int compChoice; int compWin = 0, playerWin = 0, tie = 0, rounds = 0; String loop = "yes"; Scanner scan = new Scanner (System.in); System.out.println ("Hello, let's play a game of Rock, Paper, Scissors!"); while (loop.equals("yes")) { compChoice= genera...

 
@amon Can be more expressive, yes. My favorite language is Scala, so I have to mostly agree with you, but like all tools, it isn't always needed.
I also have a fondness for Lift's Box mechanism.
 
@amon could you elaborate on option monad for me, I looked it up on google went to wiki and still am a little confused.
 
I need a keyboard macro that types "Please see our Help Center"
 
@Malachi It's something mostly used in functional, statically typed languages, and is a refinement of the null pointer concept. We have a collection type called "Option" or "Maybe" that contains either zero or one element. This is equivalent to null or a non-null pointer.
 
@retailcoder - you just need to kick SE but on this:
10
Q: Can a "Not your code" default off-topic option be added to the close dialog?

rolflA number of questions have come up recently where the code is not the asker's own code, prompting a 'close' response. It would be convenient if there was an 'off-topic' close option that included: off-topic because the code you want reviewed is not your code. See the help (item 2) for on-topi...

 
4:30 PM
@amon ok now I understand.
 
@rolfl how about a feature request for an actual button (floating toolbar?) that shows up when you type a comment on a question, with a button that inserts auto-text that links to help center?
I guess the off-topic reason would be much less effort ..
 
Welcome @RossDrew.
 
@retailcoder There is already the [about] autolink (see stackoverflow.com/help/formatting)
 
@amon I didn't know that. then we need one that links to [on-topic]
 
apparently, [help/on-topic] ought to work
 
4:36 PM
nice!!
 
RTFM FTW!
 
DFSDFGDFGSE
JFKFDLSFMNJKD!!
 
and it does work! (as tested on above Code Review Meta post)
 
you have just saved me so many keypresses!
 
I stumbled on this a few days ago when I was confused about formatting in chat messages:

Multi-line messages are *not* markdowned, iirc
 
4:39 PM
@retailcoder - welcome to 'urban dictionary'.... invaluable at times like this:
3
 
free the whales??
hahaha read the f'in manual!!
nice ads too (road kill t-shirts)
 
I use adblck, what are ads?
 
When you see FTW, don't ever get a biker confused with a gamer or else you might be like "stfu n00b" and then get your face smashed in.
 
@retailcoder please tell me this is not the first time you've encountered RTFM >.....?
 
@rolfl it's not the first time I've encountered RTFM [with a straight face]
 
4:43 PM
.... OK, good, oterwise my impression of you would be all fubar!
 
oh I haven't done much help desk but I could see myself using RTFM along with PEBKAC error
 
Prefer PICNIC over PEBCAK
 
I like Code-18 better.
 
PICINC....not putting it together I am bad with those
acronyms
 
Problem in chair, not in computer.
 
4:48 PM
Code-18: Problem is 18 inches away from the screen.
 
@rolfl I knew that one. couldn't remember what it stood for though
@retailcoder I like that one
 
The best is when you're at the user's desk and use a walkie-talkie to inform the help desk "Code-18, under control" ..and the user has no clue, thinks it's a help desk code (which it kinda is)
 
Walkie-talkie .... huh.... when I did help desk it was at university, we had eisa cards, token ring, and coax.... those were the days. People I studied with later when on to help invent things like 'cell phones'.
 
it's a budget thing I guess
 
@rolfl lol
 
4:59 PM
reopen:
1
Q: C++ console application: Universal File Duplicator (problems fixed)

ThomasI made a simple Universal-File-Duplicator (Example: make 125 duplicates of one file). Very useful if you want to fill a whole USB flash drive or an old harddisk with an important file (Example: Bitcoin wallet.dat or privatekey) and you don't want to hit Ctrl+V all the time... Suggestions? Improv...

@rolfl it's cooler with a walkie-talkie.
 
@retailcoder The only cool thing I did on helpdesk was to create a user account for some poor guy called 'Hugh Jorgan' ..... that had me laughing for weeks...
 
Acronyms are for sissies. Real men use Huffman codes.
2
 
@Donald.McLean Huffman codes?
 
{| class="wikitable sortable" style="float:right; clear:right;" !Char!!Freq!!Code |- |space||7||111 |- |a ||4||010 |- |e ||4||000 |- |f ||3||1101 |- |h ||2||1010 |- |i ||2||1000 |- |m ||2||0111 |- |n ||2||0010 |- |s ||2||1011 |- |t ||2||0110 |- |l ||1||11001 |- |o ||1||00110 |- |p ||1||10011 |- |r ||1||11000 |- |u ||1||00111 |- |x ||1||10010 |} In computer science and information theory, Huffman coding is an entropy encoding algorithm used for lossless data compression. The term refers to the use of a variable-length code table for encoding a s...
 
Cool, even the animation carries accross....
 
5:10 PM
I hadn't noticed that. Very nice.
 
@Donald.McLean - I guess you still work in the fields where communication bandwidth is so restricted that the coding/decoding schemes are tightly conctrolled..... Nowdays the bandwidth is typically high enough that gzipping your data may slow down your transmission
 
@rolfl Actually, it's just that I'm old. I saw a system that had a data rate of 5 bauds once.
 
@Malachi Facebook uses a lot of things. PHP is one of them.
 
@SimonAndréForsberg i figured. it's free they don't have to rely on Microsoft for ASP.NET that way either
 
see also HHVM, a php implementation by facebook
https://en.wikipedia.org/wiki/HHVM
 
5:20 PM
still no votes? only my vote on the question even. I guess it has only been posted 2 hours ago, but still this is JavaScript we are talking about here.
1
Q: multiple returns in a method or one return

MaximusI have a method which returns Array. Array can contain values or can be empty. Here is the code: function getCustomerIds() { //this declaration is at the top to inform about returning value of the method; I don't declare variables at the top var customerIds = []; var linkedContact = ...

 
@Malachi There is a vote now – sorry
 
@amon good point.
that is going to bug me until I come up with some clever way of doing it.
 
5:44 PM
0
Q: Where to ask question

izomorphiusI have asked this question first on Stack Overflow but then someone said it's off-topic and I should ask it on Code Review. Now on Code Review the question seems is again off-topic. Where should I ask it after all?

^^ I'm going to answer that MSO question
 
@SimonAndréForsberg ... and up-voted.
 
@rolfl Thanks ^^
I want 1k rep on MSO so I can see vote counts
2
 
Well, then .... let me be your pimp ... ;-)
 
@amon try that on for size
-3
A: multiple returns in a method or one return

Malachi you don't even use linkedContact in that function, I assume that the getLinkedResource needs a linked contact, if that is the case then you really only need to check for the linked Resource, maybe something like this var linkedResource = getLinkedResources(getLinkedContacts(this)); and then ...

 
00:00 - 18:0018:00 - 00:00

« first day (229 days earlier)      last day (3781 days later) »