« first day (230 days earlier)      last day (3791 days later) » 
00:00 - 21:0021:00 - 00:00

12:01 AM
Oh well, I survived. I got stars again.
 
Yay! I can vote again!
@Jamal I just created an account there (a week ago or so). Favorite tags:
 
Thank's @Jamal ... migrating that question to dba.se dropped my CR rep by 55 ;-)
 
@rolfl: You'll be okay. :-)
 
I believe I will.
I did score +65 on dba.se as well as the HELLO-WORLD hat. ;-)
 
See! It wasn't a loss. :-)
And another SE site has a new monkey in its ranks.
2
 
12:09 AM
Yeah .... Funny, I once looked at dba.se and decided it brought back bad memories.
I am officially certified as a "Sybase SQL Developer" (got the certificate, and all). I do know databases (though I was never actually a formal DBA since II never carried the pager .... ;-)
 
Woah just realized there's a network-wide leaderboard for WB2013 - I'm #30!!
 
@retailcoder Links?
 
#30? wow! nice
 
I'm #102!
And I'm not even really trying to earn hats.
My SE activity has been down the last few days.
 
12:14 AM
#31 now
..the longer you look at it, the lower your ranking gets...
 
@rolfl @Jamal that was my fault. I didn't think that question belonged here. and i gained rep in the move and started with a clean slate over there....lol
 
@Malachi: Either way, I agree with the move. It didn't seem to ask for a code review.
 
@rolfl Ah, THAT'S how to get the Hello World hat! Perhaps I should post a question on Christianity which I have been thinking about for a while... But unfortunately, that wouldn't help on my leaderboard here on CR.
I'm #36
 
@Jamal and i have stars again. i voted to close as it seemed it was asking for code to be written if it wasn't migrateable
trudging through the snow I go, hope I make it home from work.
 
@Malachi I also lost the +5 upvotes on the and tags .... so [badge:eneralist] is slightly further off again ;-)
time to find some other in that area
 
12:20 AM
@rolfl sorry. i think that SQL is my highest tag as well
I think that I need to answer 8 more questions at least in
anyone want to look over my SQL answers???? @rolfl type this into search
user:18427 [sql]
i need 58 more rep from that tag to get a bronze badge in SQL
okay really I am leaving for home now
 
@Malachi - not 58 more rep, but 58 more upvotes (580 rep)
 
My work here is done for now. Catch you another time.
 
12:46 AM
asked my first question on Parenting.SE, let's see if I get this Hello World hat...
....still no views.... not a fast-paced beta.
 
You should've posted it on SO first, just for the snark. :-)
 
not too credible, a guy with 2.5K posting that on SO....
 
Parenting SE gets 1.9 questions a day. Wow.
But they've answered every single question.
 
omg they've literally answered every question
 
At the rate questions come in, they better have an amazing accept rate!!
 
12:55 AM
that's insane
 
I get the feeling that the site isn't going to be around very long
 
Same as many others, I'm sure. We just need to stay active so that we don't join them.
 
Oh, you know that's just not gonna happen
well the rest of their stats are all excellent though
 
Needless to say, I'm going back through C++ questions, mainly for voting. I've already found one non-answer from 2011, and I came across one of my 0-score answers.
 
Yay! Another [badge:nice-question] on meta (the GitHub post got a 10th vote)!
 
1:12 AM
@retailcoder - for 3 months we bathed our year-old daughter in the kitchen sink because she was afraid of the bath.....
Have you considered the regular tricks ... get him a 'special' towel or whatever.
 
@rolfl he has his "special" towel - I don't know, it just seems to be a "don't touch my hair" thing. They haven't had their first haircut yet, I wonder how that's going to go...
 
oh, the joys ....... you'll figure it out.
(first haircut for my son - freaked about the 'trimmer' being used around his side-burns/ears. Finally convinced him it was going to be OK, and then the damn hairdresser knicks his ear-lobe and h'es bleeding, screaming, and took years to get that machine used again.
(in the hairdresser's defense, he was squirrelling like a cat about to have a bath).
I wonder whether I should 'blow the minds' of the dba.se folk. I am on the second-row of their users page for the week:
 
The "new users" page is even better: 168 in one day - dba.stackexchange.com/users?tab=newusers
I say go ahead!
 
Looked through their recent questions ... none of them interest me.
 
1:33 AM
Can we close an older question as a duplicate of a newer question from the same user or it has to be the other way around? The older question is a rotting zombie:
4
Q: Capture with User32.dll or hook?

ZerowalkerI am trying to capture screenshots as fast as possible from when it's displayed, meaning that I want the latency to be minimal. Currently, I am using user32.dll to capture a window. So, if I have a game, I capture that window along with borders and everything. It's very fast, but I wonder if ho...

..and this one looks very similar:
3
Q: Need to Improve the speed somehow

ZerowalkerI have done some tests of my code, which I got help to improve here before. The code simply takes a screenshot of selected process window, encode it to jpeg(if I want) and save it to a memorystream and return it (need to that to send it). So my test which I got help with to do, simply runs the c...

 
Should be okay, as long as they're similar enough. The one without the answers should be the one closed as dupe.
 
that was my thought, but I think the one that's answered is calling the code from the unanswered one.. not exactly a dupe..
otherwise, I don't think the older one is reviewable, it's borderline asking for code.
 
You could always ask on Meta if you're still unsure.
 
1:55 AM
done:
0
Q: Are these [performance] questions on-topic?

retailcoderThese two questions were posted by the same user, in August - the user joined CR around that time: Capture with User32.dll or hook? Need to Improve the speed somehow Both have to do with capturing screenshots at lightning speed. There is code in the post, but the OP's focus isn't about the co...

 
@retailcoder Have you tried swimming or a swimming-like activity, like back-floating in the bathtub?
 
@200_success lol! They enjoy the bath, it's not the water, it's not the soap, it's not wetting the hair (he giggles!), it's washing and then drying the hair...
 
1
Q: Are these [performance] questions on-topic?

retailcoderThese two questions were posted by the same user, in August - the user joined CR around that time: Capture with User32.dll or hook? Need to Improve the speed somehow Both have to do with capturing screenshots at lightning speed. There is code in the post, but the OP's focus isn't about the co...

 
@StackExchange ta-doum-tshhhh
You've earned "Hello World" on Parenting!
 
@retailcoder Present him with a choice between washing his hair or shaving it all off?
 
2:02 AM
haha I can try that, but I'm not sure he'll get the idea (never had a hair cut, 20 months old)
 
@retailcoder It will help you distinguish the twins. (Are they monozygotic?)
 
I offer candy rewards for hair cuts, works well
 
@retailcoder Maybe migrate to gamedev.stackexchange.com?
 
@200_success we'd need to test for zygocity, the placenta analysis wasn't conclusive (there's still a chance they could be identical twins) - they do look alike, but to me they're quite different.. but not everyone agrees :)
@200_success the twins? oh, the questions.. perhaps.
Woah: 57,469 users from around the network have earned a total of 137,401 hats... and I'm #22??!!
@200_success it's not clear whether it's only about game.. you think GameDev could answer it?
 
@retailcoder The User32.dll question is marginally on-topic for GameDev. The other question says it's for desktop remoting, which is clearly not for GameDev.
Repeated screen captures seems like a crazy way to implement remote desktop, though. I think it's an XY problem.
 
2:17 AM
And neither are asking for a code review IMHO
 
2:29 AM
8
Q: Our spam needs reviewed too, not just code!

hichris123It has come to my attention that Spam Review, a site that has serious potential to help Stack Exchange people and spammers worldwide improve their spam, has been closed. This seems like a serious bug to me. First, example one: I think it's best to hear it from a spammer who is deeply affected b...

 
There's also a DFMirage Driver that you can install for better performance.
Not sure how to phrase that as a Code Review answer, though.
 
@Jamal oh, the horror...
@200_success sounds like a Programmers.SE answer
 
@retailcoder Edit the title of the User32.dll question, migrate it to Programmers.SE, and answer it there?
 
@200_success care to answer that on the meta question?
Parenting.SE time to answer: ~45 minutes.
@Jamal think you could get them migrated to Programmers?
 
Which one?
 
2:43 AM
these
2
Q: Are these [performance] questions on-topic?

retailcoderThese two questions were posted by the same user, in August - the user joined CR around that time: Capture with User32.dll or hook? Need to Improve the speed somehow Both have to do with capturing screenshots at lightning speed. There is code in the post, but the OP's focus isn't about the co...

 
@retailcoder: Too old.
 
ugh. then what?
 
We could wait for more feedback on Meta, and I'll close if needed.
 
@retailcoder On further thought, I think we should just leave the screen capture questions alone. Update 4 settled on BitBlt() anyway. Not all questions are answerable, and that's OK.
 
0
Q: Jquery Date/Time Picker for browsers that don't support the datetimelocal input

warrenAny tips on optimizing this code: http://jsfiddle.net/LkpPJ/15/ if (!Modernizr.inputtypes.date) { $(function () { var d = Date.parse($('#StartDatePicker').val()); $('#StartDatePicker').val($.format.date(d, "yyyy-MM-dd hh:mm a")); d = Date.parse($('#EndDatePicker').val()); $('#En...

 
2:51 AM
@200_success not all questions are answerable... you mean not all on-topic code review requests can be fulfilled? Really?
 
@retailcoder You could post an answer that says that your code is already optimal, and if it's still not fast enough, use a different approach (e.g. install an instrumented display driver) or get a faster machine. I don't feel qualified enough in that domain to post such an answer myself.
 
@200_success I wish I felt qualified enough in that domain :/
 
0
Q: Get jQuery object from table row click

wootscootinboogieCheck out the fiddle here. This JavaScript will take the row that a user clicks on and make an object with the key coming from the thead element in the table and the value coming from the data in the text in the table cell value. I'm looking for a more professional/succint way of doing this: ...

 
3:32 AM
Looks like next weekend challenge is, like, Of Json and Pokemons
 
Aww, I kinda wanted to develop an Internet bot...
But this will be fun too.
 
Yes!!! :D I love Pokemon. I don't think I can code any of that, but I can still look at the questions. Remember: don't forget Pikachu.
 
WEC votes on ideas seem to be lower than usual. Probably attributed to the holidays.
 
I blame the hats.
 
3:49 AM
0
A: Are these [performance] questions on-topic?

JamalBoth questions are too old for migration, so that possibility is out. It's also hard to tell if they're dupes (not exact dupes, obviously), and they may not be. Other than that, they look on-topic enough here. As they have been around awhile without much attention, possibly due to the complexi...

 
4:01 AM
@syb0rg or the WEC thing is getting exhausted already?
 
@retailcoder My hypothesis is that it's the holidays. Or hats.
 
@rolfl 58 more upvotes? really?
 
Fine, I like your hypothesis more than mine :)
 
@retailcoder I think another problem is that we are featuring the index of all the challenges, not the current challenge itself.
 
@Malachi yup. And gotta keep the downvotes low, each downvote nullifies an upvote in the tag score.
@Jamal ^^^ @syb0rg's got a point here
 
4:04 AM
We can also do what Tim Post is doing with his contest: excluding downvotes.
 
@Jamal What is his contest?
 
79
Q: Should employees with head injuries be allowed to post on meta?

Tiny TimWhile yodeling to myself quietly in our warehouse today, a pallet full of mugs came crashing down on my head, and gave me a concussion idea. First, it's very unlucky to go yodeling around on a skate board in a dark warehouse, and second, we could really use a short creative writing contest. Fort...

 
@retailcoder that kind of sucks, I need to work on some more answers or something
 
@Jamal I was thinking of doing that too, and use downvotes as tiebreakers
 
You could then include that on the main post so that people don't waste their votes.
 
4:15 AM
I am such a loser that post that got migrated I just got my answer downvoted. and no one will tell me why....???
 
@Malachi The question that got migrated to the database administration site?
 
@Malachi the badge is awarded on score, not rep. That way both question and answer upvotes count equally. (and downvotes). I am approaching silver for java, and bronze for optimization:
 
@jamal wait downvotes can't be tiebreakers, it makes an incentive... has to be only upvotes then, as Tim has it.
 
@retailcoder What are the incentives of winning?
 
@syb0rg me and @rolfl are talking about getting the tag badges
 
4:29 AM
@Malachi as for the dba downvote, DBA and database people in general are, by design, very pedantic and structured. My guess is that your 'easy' style is not suited to the DBA crowd, and thus gets a negative response. It's a result of the question migrating to a place where the viewers are more critical than here.
DBA's do not have a sense of humor .... trust me, I know.
3
 
@rolfl I got 2 downvotes while it was here on CR and no explanation either
 
I have not down-voted your answer, but I have not upvoted it either. I am willing to explain why if you want....
 
4:45 AM
@syb0rg it's your idea that shows up in the newsletter; this week, @rolfl's Sudoku Solver was featured through the posts of @SimonAndréForsberg, @GarethRees', and @tomdemuyt. If @StackExchange chipped in, ...nobody knows the extent of what incentives they could come up with! It's been 3 straight weeks the tag shows up in the newsletter. For sure they're watching us...
2
 
weird... i just had "@corbin" notifications show up in my notification bar thingy from 2 days ago as new
 
@Corbin it happens to me once in a while
 
strange
side note: is there a way to tell what hat someone is using?
i thought hovering over it would have a tool tip or something, but no
i'm curious what retailcoder's terrifying hat is lol
 
@rolfl it's all good. sometimes you have good days and sometimes you have bad days. I just need to learn more code, write more code and read some more coding books
 
oop im slow
 
4:58 AM
@retailcoder Wasn't my post featured as well?
 
i see it now. just gotta click the snowflake
 
@retailcoder 's hat is the Defender of the realm @Corbin
 
thanks
 
@syb0rg indeed, as well!
 
i dont know how i didn't see the snowflake thing before
ah
 
5:00 AM
13
Q: Christmas Hat Haiku

Mark MayoIn a discussion on travel, we were upset about the lack of possibility of getting some hats. Some certainly seem out of reach on the travel site. For example: The "Oh The Horror" hat. And so began a poem, a Christmas poem... In a brief chat on Travel Began a lament "Cannot get a guru hat!" O...

I completely forgot (but was just in time)!
 
There goes all my money...
 
Trading cards!!!
 
goodnight everyone
 
Goodnight!
 
@Malachi Good night!
 
5:06 AM
@Malachi good night!
 
wooo bioshock is finally on slae
sale*
 
I still have some "pocket change" from selling excess cards on the market (people will buy anything). If I can't find another game I want, and if I find extra cards, I'll sell those.
 
hrmmm do the cards actually go for anything?
or did you have non-common ones?
 
They help level-up your account. That's about it.
As for the market, most are worth several cents.
 
ah
interesting. i see the one i just got is $.60. guess i should sell that
 
5:16 AM
It does help to check what people are selling them for, too. If you go too high, chances are they'll never be sold.
 
yeah, said 1052 sold for $.64 today. i sold it for $.63 just in case, and it sold instantly
 
I don't think I've ever gone that high before. But I also don't think I'm too good at this selling thing. I mostly sell common cards anyway.
 
well it was a limited time card that was specific to today
so i guess people are determined to get them quickly
seems the rest of my cards are just like 5 to 20 cents
 
Ah. I found about the sale not too long ago. I was too busy with SE stuff that I forgot to keep checking for it to start.
 
5:32 AM
good night @all, I'm out!
 
@retailcoder Good night!
 
Goodnight!
 
How do you get the unicorn hat?
 
@Donald.McLean: I'm not entirely sure, but someone mentioned that it's related to Meta. I got it from SO, though.
 
5:50 AM
@Donald.McLean I believe that you have to have 5 comments or more starred 2 times on a meta site.
 
Blimey
 
I FINISHED MY MARKETING PLAN!!!
I CAN DO TINGS NOW!!
Like go to bed. 'Night all.
 
Goodnight!
 
night
 
 
5 hours later…
10:39 AM
0
Q: safer way to wait amount of time

BironDavidI'm writing a helper for asynchronous operations. By default, winjs does not provide a way to wait x seconds before the execution of another function. So I decided to write a helper. (function asyncOperation() { "use strict"; // ---------------------------------------------------------...

 
 
3 hours later…
1:27 PM
A new day dawns.
 
and I am on vacation .... whooo hoooo!
(but I will be doing some work anyway .... just on my terms).
 
Gooooooooood morning!
 
1:52 PM
@retailcoder Erhm! *coughs*
 
2:18 PM
0
Q: Am I doing Exception handling correct

Mahesha999I know there is more than enough literature on this subject, but want to know what am doing is just right. So below is what I have followed and not followed: I have 4 classes, and a separate class say Diagnostics that performs logging and diagnosing activities. Diagnostics have four overloaded ...

 
So
Your code is code golfy.
 
@StackExchange ^^ No, you are most likely not - NEXT!
2
 
is there a better way to say that ?
Maybe 'Something is wrong with you!' ? ;)
 
@tomdemuyt Your code is written in minimum form? Your code seems to be written for the purpose of being as short as possible? Your code is golfic?
 
Golific!
with a capital G, we should coin that word
 
2:23 PM
Golificient!
2
@SimonAndréForsberg what's up?
oh
Gooooooooood AFTERNOON!
 
@retailcoder Thank you, that's better :)
 
lol. Thanks for the green tick on your C# sudoku post :)
 
@retailcoder Wouldn't that be a woman golfer who switched careers and took up Evil Sorcery?
5
 
@retailcoder np. I noticed you had updated and added some more info so I thought it was about time
 
@SimonAndréForsberg yeah, was about time! :p
@StackExchange
1. Does my question contain code? No => off-topic. I'm not denying the effort you put into your question, but rule#1 cannot bend, your question has to include the code you want peer reviewed. If your question remains that high-level overview, I'm guessing we can flag it for migration to Programmers.StackExchange, where it would be more appropriate. — retailcoder 1 min ago
 
 
1 hour later…
4:10 PM
@StackExchange No new questions Zombies recently?
 
I got a Revival badge for querySelectorAll shim for non-IE browsers, does it count as a zombie?
 
Revivals always count (and there's even a hat for it)!
 
now I need to know what the SQL Experts think of this answer
1
A: Database schema for a school

MalachiYou Data Needs to be more ATOMIC AND HOMOGENEOUS on this table create table StudentGradeReport ( StudentGradeReportId int primary key identity(1,1), StudentInstanceId int foreign key references StudentInstance(StudentInstanceId), SubjectId int foreign key references Subject(Subject...

@Jamal what do you mean by "and this next close was automatic."
was that just because they tried to ask a question here that would have been migrated there?
 
4:25 PM
I really want to take out the javascript, the to be reviewed code is in lua ...
 
@Malachi: It woud've been closed anyway, but I also thought an unsuccessful migration would've stopped the whole process. I'll just keep it closed.
 
@tomdemuyt I removed the javascript tag. it's not about Javascript really. if they tried to do both I would suggest to the OP to separate it into two questions, optimize the JS first then translate to Lua then post the Lua optimization question.
 
Cool
 
0
Q: Are redundancy and reflection my only choices here?

RobViousI have a function - TriggerNotifications - that accepts a NotificationType. The Type determines which settings I should pull from the User. The code looks like this: public void TriggerNotification(DbContext db, User user, NotificationType type, string content) { switch (type) {...

 
4:49 PM
0
Q: Python: Removing redundant lines from script

Boosted_d16Context: Ive been learning Python for a few months and I'm able to write codes which do work but they normally look very ugly and contain a lot of unnecessary code. But I normally struggle to find better ways to do things because of my limited knowledge. I would like some advice on what I can im...

 
5:06 PM
my Java Friends
0
A: Compressing a string

Malachiimport.util.* One thing I have notice from reading other Java Reviews is that you don't want to import more libraries than you have to, really this goes for any language I would think. so figure out what you need in java.util and import that. I know that in C or C++ there is a library that when...

 
0
Q: Should I create an empty string and append through a foreach loop or should I use StringBuilder?

kushHere's the current code: static string GetResources(string header, string filter, string resourceTemplate) { string themeName; if (!TryGetHeaderValue(header, "theme", out themeName)) return ""; var resources = ""; var path = Path.Combine(HtmlPreview.Base...

 
5:20 PM
whoever upvoted me on that answer, I found more that could be changed. maybe I should look into coding Java....lol jk
 
5:35 PM
@Malachi Of course you should be looking into Java :)
I agree with the first part of your answer, but I'm not so sure that the last parts will work the same as the current code
 
5:56 PM
0
Q: Play REST server skeleton app

Marco46Last weeks i have built a sample project for a Play REST server and put it to my github. Please takes a look and start discussion here around that subject.

 
@SimonAndréForsberg the output should be the same, I dont' think that I have a Java Compiler on this machine otherwise I would test it. but the logic didn't change. and I only manipulated variables that weren't used anywhere else
 
6:15 PM
Nother question
I dont think cofeescript code should be tagged with JavaScript
opinions?
 
Question; I have a series of Divs put in a row via display:inline-block; what is the best way to center them?
They're wrapped by a div.
 
@PhilFromHeck Would text-align: center work here?
 
Unfortunately they're 100x100 divs with background images; so no.
 
0
Q: How safe is my Encrypt/Decrypt PHP function?

Ali Abdulkarim SalemI have to protect really sensitive information and I have to do it both ways, Encryption and decryption. so I'll be using this php code: function encrypt($mprhase) { $MASTERKEY = "KEY PHRASE!"; $td = mcrypt_module_open('tripledes', '', 'ecb', ''); $iv = mcrypt_create_iv(mcrypt_enc_get_iv_siz...

 
hi all
 
6:27 PM
I am nobody, who are you? are you nobody too? Then we're a pair.
 
@PhilFromHeck Well, I have to admit that I've got no idea what design you're trying to code. Why don't you post a question on Stack Overflow with a picture showing what you want, and a minimal HTML+CSS example to show what you've got?
 
The idea would be to evenly space the images across that green div.
 
@PhilFromHeck Centering would be this
@PhilFromHeck For even spacing, you might enjoy display: table-cell more… but that depends how you want the edges
 
Alright, cool; thanks a ton man!
 
Then there is always the (not universally supported) flexbox model
 
6:32 PM
I want it to be relatively portable; that's why I wrote the custom javascript :P
 
@tomdemuyt What's coffeescript?
 
@PhilFromHeck CSS3 is supported quite well (excluding most IE versions), so the animation could have easily be done with a transition
 
Only back through IE 10, amon.
Only IE 10+... oh my I just failed :P
 
@PhilFromHeck That's where “polyfills” come in: JS shims that emulate unavailable features – but only if necessary.
but I should stop talking now about stuff I have no experience with
 
6:39 PM
Well, you're more knowledgeable than I; I have a new subject to research.
Googling "polyfills", as we speak :P
 
@PhilFromHeck You will also want to research modernizr.com – a JS library that can tell you if certain features are available (better than remembering which version of IE can do what, and what browser IceWeasel was again)
 
Thanks for the advice! :]
 
Why not just pull the value from the Dictionary? If it's an invalid value, you'll have your exception for free! :) — retailcoder 2 hours ago
Because then you get some stupid, unintelligible exception message. This way you can actually throw somethign useful. — jessehouwing 54 mins ago
The KeyNotFoundException would (should?) never be thrown in production code, so a custom exception makes no sense to me. "The given key was not present in the dictionary" says exactly what's going on, and the stack trace will point to Dictionary.GetValue in the very method you're doing that, which is all you need to debug the issue. I don't see the added value of a custom exception message in this case, it's overkill. — retailcoder 1 min ago
^^ Am I right here?
 
@retailcoder: If you get no stacktrace then the custom exception could offer needed information
 
@Nobody how would you get no stack trace?
 
6:51 PM
0
Q: (How) Could this code be improved?

JakkyDI'm pretty new to ASP/MVC but have had some prior programming experience. I am trying to retrieve statistics about URL clicks - total clicks and unique clicks by IP address. I started with: ViewBag.ClicksToday = context.EmailLinkClicks .Where(c => c.CreatedOn == DateTime.Today).Count(); V...

 
@retailcoder Generally, encapsulation is considered to be a good thing. On sites other than Code Review, pragmatism would also have a place (I write Perl: It's ugly to look at, but beautiful that it works).
 
programs in production don't bother users with details like stacktraces
in general a stacktrace is good and should be present but it is not always available for whatever reasons
 
@Nobody right, but in this case the dictionary is replacing a switch block over a finite set of enum values - if the exception is thrown it's because there's a serious bug, clearly wouldn't be thrown in production.
I mean the exception would only be thrown in the dev's IDE.
 
who are you to assert such?
 
@Nobody the assertion I'm making is that the developer tests the code he's writing...
 
6:53 PM
you can never be sure that the code won't be reached in production
you can minimize the risk
 
1
Q: Can I put my code on a third party site and link to the site in my question?

Simon André ForsbergIs it OK if I write a question and instead of putting the code here on Code Review, I include a link to github/pastebin/other similar site? (Seeing as there wasn't a similar topic like this here on meta, I thought it was about time to post one)

 
^^ I thought it was about time someone asked that on meta. @Jamal I flagged it and asked for making it CW, possibly also FAQ.
 
@StackExchange Isn't this basically what the [help/on-topic] page already covers?
> If you want a code review, you must post the relevant snippets of code in your question. It is fine to post a "see more" link
 
@Nobody if I have an enum with values { A, B, C } and you write code that fills up a dictionary with {A, B, C} as keys, how is it possible that D appears in production? If D isn't in the valid enum values, the code won't even build...
 
0
Q: Optimising Funny Marbles

user2369284Problem statement is at :http://www.codechef.com/DEC13/problems/MARBLEGF My code gives time limit exceeded. My code: import java.util.*; class funny_marbles { public static void main(String[] ar) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int ...

 
6:57 PM
@amon In one way, yes. But having a meta question for it seems useful, and also easier to link to some times. And could also be a place for adding comments/questions/further discussion about it
 
Done.
 
@Jamal Thanks.
@Jamal Also feel free to edit it and elaborate on the question/answer. I wanted it CW for a reason :)
 
@retailcoder: I see this as part of defensive programming
for 3 enum values this is managable but it seldomly stays at this level
and as the complexity grows it becomes harder to manage
 
@SimonAndréForsberg: I may. Right now I'm revising some wikis on the main site.
 
7:00 PM
@Nobody I'd rather have the app blow up with a funky exception message if my messed-up code inadvertently ended up in production, than telling the user "We're sorry, something unexpected has just happened that wasn't supposed to happen, please take a screenshot and email your help desk!"
 
that was not the point
 
@PhilFromHeck i know that I am late to the conversation but I was thinking that you would want margin-left:auto; and margin-right:auto;
 
the point was to exert a message that bears more information
without giving a full stacktrace
it might as well be that even the stack trace does not capture every needed bit of information
 
@amon @PhilFromHeck The Fiddle that Amon gave was nice though, I didn't think that text-align would work if there was no text involved.
 
@retailcoder: another scenario that goes in the same direction would be to distinguish further and emit different exceptions to react in another way higher up the call tree
 
7:05 PM
@Malachi That's the point of an inline-block – the element styled thusly behaves like an <img> in flowed text, and therefore respects alignment
 
@Nobody So defensive programming is like, write every line of code as if the next line of code could be written by a drunken crackhead?
 
@amon been a while since I got to play with websites and CSS stuff. I kind of miss it a little bit.
@retailcoder are you trolling?
 
@retailcoder: In some sense yes. Of course you have to choose some tradeoff between your paranoia and your programming efficiency
 
@SimonAndréForsberg coffeescript.org
 
@Malachi maybe a little... I just don't seem to get how one could write C# code that puts an enum type as a dictionary key, and then manage to build that C# code while trying to fetch a non-existent enum value from that dictionary. Seems to ignore the language's type-safety.
 
7:10 PM
@tomdemuyt I agree, then. Coffescript should not be tagged with JavaScript (or possibly tagged with both)
 
@retailcoder: The case in question is hardly big enough to justify the extra work of a new exception class. however, it is not easy to draw a line when to start and as I said such code can get out of hand very fast
 
cOOL
 
@Nobody true.
well, that was fun :)
(gotta work... at least a little)
 
7:38 PM
anyone care to look at an answer that doesn't answer the OP's Question but reviews the code??? (it's PHP)
 
7:48 PM
did everyone leave because they ran out of votes already?
0
A: How safe is my encrypt/decrypt PHP function?

MalachiNothing to do with the Security of the Functions what you should do is create one function that will accept a parameter of encrypt or decrypt most of the information that you are using in both functions is duplicated. function encryptOrDecrypt($mprhase, $crypt) { $MASTERKEY = "KEY PHRASE!"...

 
@Malachi: Seems to me that the function does not have a single responsibility
 
@Nobody the function that I created?
 
i would probably create a class that has an encrypt and decrypt method and does the setup/cleanup in the constructor/destructor
2
yes your function
 
@Nobody it just seems like a lot of work being written twice. I agree it should be it's own object, that can encrypt and decrypt
 
@Malachi Your function is stringly typed, widely considered to be an antipattern. This is not the correct approach to avoid duplication.
 
7:55 PM
@Malachi: I agree but I think it is clearly visible that what you are doing there is object oriented usage
construction, usage, destruction
and hence should be modelled using an object
 
@malachi Thanks bro!
 
@PhilFromHeck remind me what we are talking about Phil
@amon are you talking about the parameter? I just took the OP's code and altered it a little bit, the parameter could be anything they want it to be, like an Integer or a boolean.
 
@Malachi yes, and I agree, although I also wanted to use this as an pretense to link to that wonderful blog post
 
@amon thank you I am enjoying the link. both you and @Nobody have helped me to see the code a little differently today.
Code is such a complex thing.
6
@PhilFromHeck the Margins don't work, I tried them in the JSFiddle with the Code that does work, where I just removed the Text-align and put in my code, but it didn't work, I was way off
@amon unicorny @Jamal would like that one I think
 
@amon: Interestingly your link returns a 404 for me
 
8:09 PM
@Nobody works for me. Are you behind some firewall? (But why would anybody want to block Jeff Atwood?)
 
I doubt that a firewall would give me a page: The requested URL /blog/2012/07/new-programming-jargon.html was not found on this server.
i think it is my dns server together with my apache default vhost
it sometimes gets in the way
 
weird. The original SO question was deleted, but I think most people here don't have the rep to see it
 
@amon: Regarding why would anybody want to block: youtube.com/watch?v=csyL9EC0S0c
I don't know where exactly but he has a rant in there
about jeff atwood and codinghorror
 
thank you for a a one-hour long video /s ;-)
 
sorry about that
I tried to find it but I totally forgot where he said it
 
8:17 PM
there is a single hit for “atwood” in the slides that were linked to in the video description
> some bloggers (terrible atwood) tells people off for playing and learning
 
I don't know if he does the rant there or if it is just a sidenote
 
As I'm not a regular codinghorror reader, I have no idea what incident this is hinting at
 
I do also not know
 
@Malachi it's the thought that counts anyways :D
 
@Malachi: I think I found it: youtube.com/…
2
 
8:20 PM
@amon there are some people that absolutely hate Jeff Atwood, I watched a video one time and the guy took like 15 minutes out of his 1.5 hour presentation to say what he thought about Jeff and some other people that I don't recognize
@Nobody holy crap that is the video I was talking about...lol
 
loool
 
0
Q: Instagram API pagination with javascript code review

Khaoula E.I'm new to front-end dev, I've started learning three months ago. I'm working on an API from instagram but the pagination part is not working. I have tried so many types of codes, but nothing. If you can please review my code and tell me if I'm doing something wrong. The next page is supposed t...

 
someone asks who is jeff atwood, youtu.be/csyL9EC0S0c?t=59m18s
 
yep
and then he goes off
I read some articles from coding horror and enjoyed them
so I don't see it the way the speaker does
 
@Nobody There is a valid criticism of the stackexchange model in that remark: For the asker, it's basically a crowd-sourced copy&paste engine.
 
8:25 PM
but if he is right about the thing where Jeff tells people off for playing around then I am totally on his side
yeah but the part about stackexchange is no critique against atwood
and there are enough meta discussions about how to avoid such questions/answers
 
here is something that I have done myself, and I try to keep myself from doing it more than once (ok more than half a dozen or more times) youtu.be/csyL9EC0S0c?t=1h47s
mashing it into everything that comes along. hey it worked over here let's give it a try over there
 
You have to try the boundaries :)
I see it this way: I keep using something until it does not work anymore
then I will look for something else
 
got me all distracted from work....
 
tell me about it ...
btw. whats the time at your place?
 
8:51 PM
2:51 pm
 
so your working hours?
 
I have a nice 8AM - 5PM job.
 
00:00 - 21:0021:00 - 00:00

« first day (230 days earlier)      last day (3791 days later) »