« first day (292 days earlier)      last day (4023 days later) » 

00:00
ofc =]
RELOAD ... ;-) !
lol
Tag wiki edit rampage.
@syb0rg … about that rampage.
17 o.O
Oh, hi @Yuushi!
00:06
Some of your edits seem outright useless … what's the sense of providing the build number of a .Net 2.0 release?
hey @syb0rg
@amon For the curious I suppose. :P
Do learning resources make sense in a code review community? Feels too Stack-Overflow-y to me.
i love vim
I am not a big fan of laravel
? I'm thinking that needs burnination.
00:15
what's meta-programming...?
0
Q: Setting up keyboard bindings using JSON and reflection

davidkennedy85My game uses configuration files in JSON format. One of them is used for setting up keyboard bindings, and it looks like this: { "Escape": "Exit", "S": "MoveDown", "A": "MoveLeft", "D": "MoveRight", "W": "MoveUp" } In the Main method of the Program class (my composition roo...

@nhgrif programs that write programs, for example.
@syb0rg - rejecting the audio ones... not sure if others will accept them...
@rolfl I saw :( but it kinda makes sense why in your comments.
@syb0rg Why do you think it needs burnination?
00:18
@amon - I am mostly OK with the wiki rampage, with the conditions that the tag is already being used on CR, there is no wiki text at all yet, and that the copy/paste is checked for working links, and other basics first
Oh, I was thinking is was the thought of programming...
OK (not good) wiki text is better than nothing.
good wiki text would be better, but that allows others to come in and make their own edits too
@200_success Ahh, now I can vote on your answer.
@syb0rg FYI: UTF-8 uses up to six bytes of encoding – four bytes are needed for the basic multilingual plane, but there is more. Also, UTF-16 is not a fixed-width encoding, and uses four or eight bytes.
ah, the intricacies of UTF
00:29
I have to say that UTF-8 has had me entertained for some time ....
argh, I got that wrong, UTF-16 uses two or four bytes.
I just starred a lol.monkey!
hehe
hi!
@amon I was going to say .... but... I thought the largest encoded unicode character was 4 bytes....
@Mat'sMug I put that there especially for you all, and it took a long time to autostar
(that, FWIW, was intentional, and my only l.o..... )
of course! ;)
00:37
@rolfl What's the reason for using final on basic types like char?
That's an interesting question ;-)
it is, for me, pure discipline .... but, it also allows some easy-to-recognize optimizations in JIT
hrm, I would have thought that it wouldn't have had any impact on the optimizer
...wow that's a confusing sentence when I read it back. I think I need more coffee.
@Yuushi I learned a lot in this exercise: github.com/hunterhacker/jdom/wiki/Verifier-Performance
I think the JVM can nowadays optimize just fine without final variables. But immutability is a good habit.
hrm, cool, I'll have a read of that throughout the day :)
yes, I know it's a good habit. I just come from more of a C++ background where writing const char c is somewhat...meaningless
00:42
@Yuushi - final really does make a difference in performance.... even though, in theory, it shouldn't
The compiler should be smart enough to identify when things are not modified... but, it does not always.
It also helps avoid bugs
As I implementd JDOM 2.x I took regular performance measurements:
The results are not easy to read, but they are substantial.
and final was a significant part of that.
actually, does final have (C) restrict like semantics?
Reading up on restrict, no... it does not appear to be similar in concept.
For a start, final can be applied to primitives (not pointers).
hrm, ok, this makes it a bit more clear to me
"Another C++ parallel is SomeClass * const ptr"
One place I believe final makes a difference in the Java JIT, is inlining.
It means that the inlined Java does not have to copy the pointers/primitives for the parameters, but can use the outer pointers/primitives directly.
(and inlining methods is easy if they are final methods)
I'll have to file all this away for if and when I have to use Java next :)
00:49
and Java gets a lot of value from inlining, because there is otherwise quite an overhead in the method prolog/epilog
… but final methods are the antithesis to polymorphism, IIRC
That is true.... but, final has other reasons to exist on methods as well.... like in JDOM: github.com/hunterhacker/jdom/blob/master/core/src/java/org/… <-- final equals and hashCode
where polymorphism is going to break, not solve things
It kinda makes me sad that the most popular tag in conjunction with python is mongodb
kinda fresh dead though ...wait, is that almost 6 months already??!
00:59
Precious activity ... 28 December ... I guess, but he just accepted an answer from a question posed last October.
nice feeling huh?
I had a potential serial up-vote earlier, and they picked my oldes zombie-answer to upvote.
It was somewhat pointless, because of repmax, but, it did make me look through my history .... and, if I may be so bold as to pimp: codereview.stackexchange.com/questions/36338/…
@rolfl your CR birthday (first answer) is Halloween!
Yeah... ;-)
I was feeding candy to the street children at the time
01:12
wow I was 5th to earn [badge:talkative]... now awarded 55 times - look at this: codereview.stackexchange.com/help/badges/60/talkative
How's your sportsmanship coming on?
I have a query that can help....
yay first answer on cr, annnnd goodnight
@Mat'sMug - data.stackexchange.com/codereview/query/164444/… .... you don't have enough competing answers to get sportsmanship at the moment ... only have 95 ;-)
@RonniSkansing Bye!
01:21
bye!
@rolfl interesting..
Lol, said "bye" to the wrong person.
I almost made a typo and wrote "byte". Some key combinations/sequences are just hard-coded in my fingers..
@RonniSkansing congratulations, you posted your first CR answer!
yeah, like @lol<tab>
01:25
@Mat'sMug - are you paying attention?
6 mins ago, by Ronni Skansing
yay first answer on cr, annnnd goodnight
I think he is paying pretty close attention
=]
hmm.. shifting tabs, missed that one
@RonniSkansing - he's probably skimmin CR Answers for us
@syb0rg your audio formats are missing FLAC. For shame! :P
the audio ones should be thrown out ...
01:26
I often say goodnight like 5 min I actully close, dunno why =/
=]
in CR Answers, 11 mins ago, by Mat's Mug
0
A: Parsing record-jar format in PHP 5.3

Ronni SkansingI have rewritten the script in another fashion. Beware all you code is almost exactly the same. A number of personal preferences I would like to share, that I thought while reading your code but which I did fix in my own code in all cases. I like (foo === false) better then (! foo) or foo (!==...

I say good night, then go brush my teeth, then check in again, then check on the cat, then check in again, then climb in to bed, keep reading a bit, maybe answer something, then it's suddenly 2am, and I really go to bed.
4
@Yuushi NOOOO
Then I turn on the olympics ... and I'm toast
76% of the way to Research Assistant.
01:30
@RonniSkansing I think it would be a better review if your answer explained the design decisions your rewrite has made (extracting methods), and why. Also don't think you need to rewrite the OP's code in every answer, a couple of useful points/observations (like the comment you made on the question) can be a fine answer, too :)
@Mat'sMug thanks for the feedback. It was also a getting abit tiresome writting the code, the function was so loaded i kept segregating and it was not even enough
I would have like to added a couple parsers / converters more so she/he could seen the ideal behind it.
although rewriting the code should earn you the OP's recognition ;)
And you are quite right, I should have talked more about how it could adhere to solid princips...
hehe
Or I should learn more procedual patterns
procedural patterns? like, the 5-screener pattern?
(googles "procedural patterns")
@RonniSkansing I think it was worth the +1 I gave it. One of the things we are trying to encourage is lots of answers for questions. If you have some things to say, that add value, then you can just say the parts that count... otherwise reviews can take a really long time.
01:36
20
Q: What were the Design Patterns of the procedural programming era?

VoracSimilar: How was programming done 20 years ago? OOP is quite fashionable nowadays, having its roots in Simula 67 in the 1960s, and later made popular by Smalltalk and C++. We have DRY, SOLID, many books about design patterns in the object-oriented world. But what were the main principles in pr...

You don't have to do 'the whole 9 yards'
Thanks for the +1 and feedback
This question has two answers, they both tacke different, but small points on the question
It is also OK to answer different subjects in separate answers .... this is a 'new thing' of sorts, but it allows more flexibility.
Well that is good to know and great example too
Oh, I found a C++ zombie.
01:43
link?
@Jamal what's that smell? ... ... melting silver?
I'm going for the (Olympic) silver medal in C++. ;-)
good job!
I still need 12 upvotes, so one more zombie may not be enough.
0
Q: Java: best practice for if statements

MudThis is probably subjective but I'm wondering what the best/most used practices are when it comes to if/else if/else statements in Java regarding the following: often times I'll see something like this: if (someCondition == true) { //do this } Other times I see stuff like: if (someCondit...

01:49
count again
latest Java question looks off-topic
Thanks, Santa! :-) Hopefully that won't be reversed, but we'll see. I'm working on the zombie now.
CV/opinion-based?
Ew. Tag in title.
@Jamal How much was it?
off-topic, but I still feel like posting an answer of "people that use if(boolean_value == true) should be hit with a clue-bat".
7
^^ I want a t-shirt that says that!!
@Mat'sMug Ho my, minus the reputation I've given, if that is all from one user, than it most likely will be reversed.
it makes no sense
@syb0rg: How much was what?
01:55
@Yuushi I was actually writing that up in an answer when you posted in chat that it was off-topic.
@Jamal Upvotes from one user, but I'm not sure if multiple people voted.
If that all was from one user (minus mine), then I'm guessing they will be reversed.
I SAF'd it, won't be reversed.
@Mat'sMug Another nerdy t-shirt to throw onto the pile :)
I'd wear it at work!
0
Q: Different templates for various resource representations in Marionette

niftygriftyI'm making a Backbone-Marionette app with a file structure that matches restful verbs as much as possible. It looks something like this: + backbone + apps + student + show + list + new + lesson + show + new + edit If for example the student show co...

I wear my xkcd "my normal approach is useless here" t-shirt to work all the time :)
01:58
@syb0rg: I'm not sure who it was exactly, but I assume it wasn't done carelessly.
@Jamal It looks like it was from multiple users anyhow.
You should be safe.
@Yuushi: Don't remind me about calc. >.<
@Jamal sorry :)
Haha. This is the kind I prefer. I just want to stay away from vectors (but my answer uses std::vector).
02:00
@Jamal - I think that will be reversed :(
I spent more than double the votes I gave, won't be reversed.
huh.....
I gave a safe threshold of votes.
anywho, lunch time
I saw about four votes in at least a single minute, but the consecutive minutes may be a factor. I'll report here about it in an hour.
02:02
heh .... well, I was AFC for that moment, so, you still short?
IIRC the script runs at around 3AM UTC.
(so yeah in an hour)
The last time I was sure I would get hit, I didn't. Maybe I'll be okay this time.
> Continual abuse of the system which causes multiple reversals can lead to a suspension, but the review process for such a suspension is completely manual. No automated flags are ever generated for this behavior, though moderators do have access to some statistics that can help fight repeat offenders.
170
A: What is serial voting and how does it affect me?

animusonWhat is voting fraud? Voting fraud is when a single user continually voting (up or down) on many of your posts within a short period of time. This is not considered normal behavior and the system will not allow it. If it continues to happen between two certain IP addresses (voting each other up)...

not a habit to take
I suppose I should check some stats for myself.
Hello @JamesKhoury
02:15
@Jamal - nice answer, and close now to an enlightened ;-)
Yep! Console Calculator is also close to Necromancer.
0
A: What can I improve on my iOS PDF class?

nhgrifOne immediate change I'd make is how you're handling errors. While try-catch blocks are extremely common in other programming languages, I actually don't see them al that very often in Objective-C. That doesn't mean we won't have errors. It just means error handling is typically handled differ...

got it!
@nhgrif you just killed a zombie!!
And another necromancer HTUnEscape
asked May 31 '11 at 0:24
02:18
Nice! At least the badges will stay.
@nhgrif - you can expect a revival!
and maybe a necromancer too
He needs his first silver badge...
One more soul freed from the dark age of CR!
lol
With any luck, I'll be able to maintain the #1 position for ObjC users on CodeReview. ;)
@nhgrif you have to be careful... it really does become addictive ;-)
I have some stats that prove it
02:21
There's basically no chance of that happening on SO... but lately, I've consistently been in the top 10 monthly users for ObjC on SO.
I have 7500 rep on SO.
And I created my account in like October.
meh ... that's pathetic
@nhgrif Hey, soon enough I'll be up there too! (maybe)
I'm having bad luck with this zombie. I can't think of a good way of having a 2D vector.
1
Q: Correct usage of alignas in std::ostringstream wrapper

AlexTPlease take a look at this code: struct error_stream: boost::noncopyable { template<typename T> std::ostream& operator<<(T&& arg) { return strm() << std::forward<T>(arg); } std::string str() { return strm().str(); } bool empty() const { return !holder_.valid(); } ...

oh look, another zombie!
02:23
@nhgrif - I take some pleasure in mining the data explorer for interesting numbers... data.stackexchange.com/codereview/query/167924/…
Have a look at the rolfl line ;-)
I don't know about other languages, but most of the time, with Objective-C, you can just point to Apple's own stuff as the correct example of how to do something.
But with that said... Apple really, really, really hates MVC.
Oracle somewhat does the same with Java, in their tutorials.
@rolfl row 1 is getting pretty close now! codereview.stackexchange.com/…
@Mat ... yeah ... I know. ... :) - but palacsint has ramped up his rep
What's that tracking exactly? My rep?
02:29
yes, your rep on SO
(and mine too)
Just a simple little SQL query ;-)
You see that little gap in late December where I got almost nothing?
My computer was broken.
hehe ... yeah... happy F... XMas ;-)
Hmm, I seem to be... a bit sporadic... data.stackexchange.com/stackoverflow/query/164480/…
So, my boss has been a little grumpy over the past 2 days. Yesterday morning I mentioned that I could scan QRCodes easily.. and now... he's changing the desktop software to use QRCodes instead of Code39...
And then at lunch, after he had been messing with QRCode stuff all morning, I had found a bug in a trigger on a table in the database... and he spent the rest of yesterday afternoon and all day today unraveling it all and trying to fix it....
successfully?
02:35
We think so.
But the database is really complicated... and over the past 10 years, lots of people have had their hands in writing the triggers/stored procedures/etc... and some of those people were certainly morons.
A bug in a trigger can be devastating
Oh, it's more complicated than that.
The trigger calls a stored procedure. The stored procedure updates a table with a trigger...
And one of the tables that trigger updates ALSO has a trigger.
that's what I mean ;-)
When I tried updating a single column in a single row... the end result was some table had 30,000 rows added to it.
That's a bit better than a trigger that cascades deletes ;-)
But tht would make for a fairly large transaction ... it went through?
02:39
Eventually.
ROLLBACK took 3 minutes.
Rollback happened.... good... how did you manage that?
(i.e. how were you lucky enough to get the rollback instead of the commit?)
Well, I'm developing a mobile app that talks with the database...
the FIRST time this happened, we didn't get a rollback.
so I tried investigating it further, and did a begin transaction because I knew I'd want to roll it back
Crap.... this is almost making me nostalgic .... ;-)
I rewrote a VB program doing the trading database for a large global investment comany using stored procedures, and triggers....
You know what's really fun though? Trying to talk to SQL Server from iOS.
(without going through a webservice)
It was quite 'heady' when it goes wrong.
@nhgrif - in my meager experience, getting anything apple to talk to anything not-apple is 'really fun', and the next most 'really-fun' think is getting anything apple to talk to anything else apple.
Apple and communication are not words that go together often
02:43
The library I'm using to talk to SQL server can't return NULLs, can't return varchar/text longer than 256 characters, and I don't have any way of putting a timeout on the query, only on the connection attempt.
Even microsoft is better.
Is that a 'standard' library, or someone's hack?
Like, seriously, can't you just connect?
No, I can't just connect.
What I'm using is an objective-c wrapper on FreeTDS
TDS was 'hacked' before Microsoft bought the rights to put Sybase on a PC and call it SQL Server.
There was a free version back in the late 80's
It was better than what you are describing
I'm wrapping pretty much everything in ISNULLs, and if I get data overflow, then I just requery a new table where row 1 is the first 256 chars, row 2 is 257-512, etc.
0
Q: Optimize this PHP/JS script

FrancoisHow can I optimize my following code. It works like a charm but I think it is too long and I'm sure it could be optimized. If I have another form, I ll need to copy paste some line from my PHP code and it ll be quickly overkill. Thanks. -- JS: <script> $(document).ready(function() { $('...

02:47
@nhgrif I'm done.... this is interesting, but, it makes me realize that apple stuff is not for me... what you gain in 'UX' is more than lost in compatibility and functionality
I can't even get iTunes to work the way it should... there's no ways I'm going to fight with compatibility layer issues on stuff that was solved last century
Well, talking with SQL Server is the only problem I've run into actually.
lol
If it weren't for the fact that I'm writing an app to work with an existing program and existing databases, I'd start by using MySQL, and I'm pretty sure iOS has some better ways of talking to MySQL.
I play with 'big' systems in my day job, and small systems for fun ... there would be no reason for me to hit apple stuff at work, and I have made a personal policy not to buy anything apple if it requires iTunes.... which, as it happens, is a useful measure of all things apple
lol. Fair enough.
Have you ever messed with Android stuff?
I have discovered that not having apple devices is one of the greatest liberating things I have done.
@nhgrif yes... I have code in android
(in dalvik)
Hrm. I much prefer iOS development to Android development.
02:52
my exxperience was not great with android, and my code in there is bug fixes
I don't even care for Apple that much either.
But, that is a whole lot better than what I could have expected with apple...
I found a bug, found the source code, applied a patch, reported it, with the patch, it was fixed, and then released.
^^^ the way it should work ^^^
5 more minutes...
Survive?
Congratulations ... on your shiny C++
Haha. In terms of tag score, at least. He's still multitudes above me.
That's true. It might take a bit more time, unless something else is going to happen.
Cough... cough .. the big boys (speaking of which, where are the girls?): codereview.stackexchange.com/help/…
@Jamal reversed?
No, but my tag scores are still not updated.
I'd better check MSO.
03:08
tag scores don't update until the end of the "day"
They usually update at this time, and I still got the badge.
Now it's updated.
Tag score: 404.
lol
4
4 more votes until I get the Java bronze badge.
How are the tag badges earned again? I forget.
03:16
100 upvotes in one badge will get you a bronze badge.
400 will get you a silver badge.
And 1000 upvotes in one tag will get you a gold badge.
Okay, I'll continue this C++ zombie tomorrow. I can't quite figure it out now.
@Jamal would you be... going to sleep?
Hopefully. :-)
^^^ tag scores ^^^
@Yuushi: Do you know anything about sizing a 2D vector?
03:20
@Jamal A std::vector<std::vector<T>>?
Jamal, tag update happened
Yeah.
Perfect use of CR @nhgrif:
1
Q: How can I improve this AVCaptureMetadataOutputObjects wrapper?

nhgrifWith iOS7, Apple introduced AVCaptureMetadataOutputObjects, which is used for scanning barcodes. If you check out the web for how to scan barcodes in iOS, almost everyone is talking about ZBarSDK. And before iOS7, this was definitely the way to go. But as of iOS7, ZBarSDK has a pretty nasty me...

1
Q: How can I improve this AVCaptureMetadataOutputObjects wrapper?

nhgrifWith iOS7, Apple introduced AVCaptureMetadataOutputObjects, which is used for scanning barcodes. If you check out the web for how to scan barcodes in iOS, almost everyone is talking about ZBarSDK. And before iOS7, this was definitely the way to go. But as of iOS7, ZBarSDK has a pretty nasty me...

03:25
nice
Unfortunately, we don't have many Objective-C gurus, so it may be a while till you get an answer.
could always make it a selfie ;)
lol, yeah...
@Saposhiente Hello, I didn't notice you until now.
For some reason I am only allowed to vote 34 times today...
Odd.
@Jamal I'm not sure what you're trying to do, but if all the internal vectors are the same size, you might want to use std::vector<std::array<T, N>>
03:45
Actually, to be honest... you don't necessarily have to know Objective-C or iOS development to post an answer to my question...
0
Q: AngularJS directive structure and testing

PatrickThis was one of the first directives I made when learning Angular. I'm revisited it since learning karma/jasmine testing. It is an Angular version of Dave Rupert's FitText. When I first started out with Angular I didn't like the idea of 'unnecessary' wrapping elements being created by directives...

04:09
Hey!
@Yuushi: I was using something like this:
`std::vector<std::vector<int>> matrix (5, std::vector<int>(5));`
It does compile and display correctly.
200 has the bronze in !
@Jamal that works too
It seems so ugly, though. I assume Boost can do better than that?
nothing I know of, unless you use a matrix library like eigen or armadillo
@AlexL Hello!
04:15
I'll stick to what I have, then. I'm testing it now, but I get out of range errors.
if you get stuck, shove the code up on pastebin or something and I can have a quick look
Do you need the question as well?
nope
Yeah, they don't even teach debugging in school, as far as I know. It would take me some time to find the issue.
@nhgrif 2 more votes and you've passed the 500 milestone!
04:23
@Jamal It's a real shame the don't teach that, it would avoid half of the questions on SO being asked.
Even then, I'm (now) smart enough to save SO for very last.
do you want a solution, or a hint?
I'll take a hint.
@Mat'sMug: Really? I see 508 and an upcoming Necromancer. ;-)
Santa must be nearby...
hopefully the few changes I've made will give you enough info to see the problem :)
04:28
508
@Yuushi: My brain is fried tonight. :-P What I do see is the size displays with the range-based, and a try/catch block.
Ok, bit more of a hint. Your [y] index (that I've changed to .at(y)) is going out of range. The print statements give you the dimensions.
I get all of this: ideone.com/dRB1dK
Ok, I'll go through it in a bit of detail :)
Obviously the silver badge isn't everything. :-) But learning is still important.
04:34
so we have a matrix that has an "outer" size of 10 and an inner size of 1 (from the Outer and Inner print statements, so a 10 x 1)
Jamal, you need 2 bytes to store 10 bits.
so when you do matrix[x], you're getting back one of those "inner" vectors of size 1
Right
10/8 is 1, not 2.
@rolfl Unless you've got a big mouth.
04:35
you're then trying to call .at(y) on that, where y ranges from [0..HEIGHT] = [0..10]
0
Q: Refactoring if-else structure with elements of dict

sindikatI have code which gets data from a POST request (request.form dict), compares with corresponding attribute in object accident and does some action. The code looks needlessly verbose. How can I optimize it? if accident.status == 1: if request.form.get('reason') \ and request.form['re...

Right
Oh, I see I did mismatch some chars and ints.
Right "I see the problem", or ..... naah, that's not the point at the moment.
Well, that's one thing I've noticed.
@Jamal - you set up the vector as matrix with dimension 10x1
but, you need to store 10 bits in that 8-bit-wide 1.
04:39
I'm taking most of this from the OP's code, where he uses a 2D C-style array (as a global variable). Those are the sizes he uses, but I suppose I should adjust them.
Going back to my box....
I'm not sure what output you want, but here's a version that doesn't crash
maybe that'll help you see the problem
I think I'm done, good night all!
'night!
ta ta
04:48
night
I think I have it!
Goodnight!
Later!
looks better, not sure if it's the output you want or not, but no crashes is always good :)
It pretty much matches the OP's. I'll finish up the zombie and see how it's received.

« first day (292 days earlier)      last day (4023 days later) »