« first day (662 days earlier)      last day (3653 days later) » 
00:00 - 16:0016:00 - 00:00

16:05
4hrs in, still zero lines of code.
@skiwi I took a class in college in Java (which I already knew) and the teacher used to call me the human compiler because I could spot syntax errors in code he wrote on the blackboard.
0
Q: Array-based FIFO queue in C

coderoddeI have this "generic" implementation of an array-based FIFO-queue. As I have written very little code in C, I don't have an idea what to ask, so feel free to tell anything that comes to mind. array_queue.h: #ifndef ARRAY_QUEUE_H #define ARRAY_QUEUE_H #ifdef __cplusplus extern "C" { #endif ...

0
Q: Access VBA loop freezes after 10 seconds

poppycoI am assigning representatives at a call center to a list of call recipients (members). However, I am grouping the members by household. I am trying to assign reps using a loop through the member table while looping through the rep table. The goal is to assign all members of a household to one re...

0
Q: “Proper” Method Design

yitzihHow can I properly design what a method or function should do? To clarify the question I am going to use an example from a simple (non GUI) hangman game I created. The design is simple, it has a HangmanGame class which has the word the user needs to guess and other such things as well as the met...

@Donald.McLean haha :p
A different kind of human compiler though ;)
All right... So this DLL isnt a valid assembly, but I can drag it from explorer into the toolbox and its controls show up...
@skiwi I agree. It looks like it's presenting example code, so it may not belong here.
I may go ahead and migrate it to Programmers.
16:15
@Damian I think what you are looking for is not possible in VS ("what else refers to given object") and "Make Object Id" is likely the best you can do (i.e. in your case both "f1" and "f2" will have object with the same id). If you have issue that can't be found this way (or via code reviews/test) - you can always go WinDbg route with !gcroot- i.e. Tracking down managed memory leaks shows all steps... — Alexei Levenkov 1 min ago
Uh...?
false positive.
monking all ;-)
(again).
So, now I can get one DLL to show me controls to inherit from... But not the one I need. And I'm only building two.
I'm voting to close this question as off-topic because I think this question belongs on codereview.stackexchange.commgilson 45 secs ago
Good Morning everyone.
16:26
Monking @Legato
If I check out the whole project from source control a few revisions back (last time I added a new control) it still doesn't work...
If SO isn't the right place, I can repost to codereview. Just looking to improve my skills. As for x += 1, I knew the shortcut existed, I just couldn't find the proper syntax. Thanks! — devOpsEv 1 min ago
@Mehrad You like the UI?
I hate it, Windows 8/8.1 looks so much more realistic.
Well, I hate a lot of the new icons, although the search and multi-desktop icons are good.
And, I don't like the colors - that gray titlebar is ugly.
16:43
@nhgrif You should try this from a different workstation if possible.
@Donald.McLean that honestly doesn't sound so hard... which says something about the teacher...
Just got that gem in my work email... looks legit lol.
Looks German to me.
@Phrancis lol
that's German yes
I can't read it.
16:48
I can read it
Sure looks like spam to me
I can read the "Frankfurt" part.
What does it say (only if it is not naughty).
@Hosch250 It's a city
I know Frankfurt is a city.
@Phrancis Its phishing. As a guess you have configured win to hide known extensions
16:53
^^ Subtle lol
0
Q: Eager load additional data

Nicholas AguirreBelow is a snippit of code of a little practice project. I am still pretty new to EF and I was wondering if there is a way to write the below statement so that all required data is eager loaded since I have the ID parameter. public ActionResult Index(int? id) { var viewModel = new In...

@Phrancis "macroses" gave them away
This question belongs on another site in the Stack Exchange network such as CodeReview — Paulie_D 20 secs ago
This question can only be posted on Code Review if it is working to the best of your knowledge (have you tested it?), and if you post the code directly in the question. — Hosch250 1 min ago
17:06
@Hosch250 The Deutsche Bahn AG (= big, legit corporation) operates most long-distance trains in Germany. It has a program where you can buy 25%, 50% or 100% discounts (a “BahnCard”) for a year. I had one myself until last year. This mail says “Thank you for buying a BahnCard 25. We'll charge the amount specified in the bill from your account. You might have to enable macros to view the bill in the appended document”. It's pretty well executed, except that the Deutsche Bahn exclusively uses PDFs.
Oh.
So then, they would install some malware?
As a matter of course.
VBA Macros could definitely do some harm, though I think it would mostly be limited to Office-related things. Like deleting all your mail or something. Although I'm sure there's a way to hack some VBA to access files on HDDs
@Hosch250 did you read his profile? he doesn't flag link only answers anymore
@Malachi Yup.
I've had link-only flags declined sometimes too.
I usually downvote if I think a flag will be declined.
17:26
I'm convinced drunk-me has a different brain from sober me
I have no clue what the path is I have to take to get to my friend's place but somehow I managed to get there
@JeroenVannevel I'm sure too.
And I've told you that you shouldn't get drunk.
And I've changed the keycode of two of my bike locks. I have no idea how I would even do that
It seems you create more pleasure than trouble when you get drunk (sarcasm).
Why is that sarcastic?
Because, you get in more trouble than you have fun.
At least, it sure seems like it.
17:29
What kind of trouble do you see?
You can't use your bikes because you changed the code and can't remember what it is?
You can't navigate your way around town properly?
I've never said I can't remember the code.
And I just said that I got there
You also said you didn't know how.
I don't know what kind of point you're trying to make.
How are you going to prevent yourself from getting mugged?
Or kidnapped by ISIS?
I hear the Belgian army just busted a bunch of terrorists.
How can we know they got them all?
17:34
It's a risk I'm willing to take
OK, it's your choice.
@SimonAndréForsberg It's harder to write syntax correct code on a white board using chalk than most people realize.
This is off-topic due to being unclear what you are really asking, and too broad, and primarily opinion-based. Might be on-topic at CodeReview. — Jukka K. Korpela 27 secs ago
@Donald.McLean that it might be. but it doesn't sound so hard to compile it in your head.
2
I compile code review code in my head.
At least, part of the time.
17:41
@JukkaK.Korpela This seems to be example code which is off-topic for Code Review. — Simon André Forsberg 1 min ago
0
Q: Soundcloud to CSV File

user3120369This program connects to Soundcloud and turns the supplied username into a CSV file with the users like list. The code accomplishes this although it looks rather messy and was wondering what I could change to improve it. Thanks import soundcloud import urllib.request import json import requests ...

@SimonAndréForsberg Consider this FizzBuzz code... Please write down the Assembly code that a compiler would produce
17:57
@Donald.McLean It's hard to write correct code on a white board using chalk because white boards aren't designed for chalk :)
6
@skiwi Huh? Who's talking about that?
@LJ_1102 I would not consider this question a good candidate for Code Review. This question is not entirely clear, and it's not clear if the code works, and Code Review is not for understanding code. — Simon André Forsberg 56 secs ago
If your code works as is, you might want to consider codereview.stackexchange.com, but please check the help center there to make sure your question fits. — RubberDuck 2 mins ago
0
Q: C++ Memory management on functions

Umuril Lyeroodtoday i did an University exam where i had to create a piece of program. When he checked it, he told me that there was a problem with memory and what the problem was but i don't really got it. Could someone explain it to me? I'll be here for any questions. PS: I had to program it in C++ without...

@SimonAndréForsberg That would be the question you get on your exam ;) On the part of compilin in your head
18:08
@DanLyons Right. I meant black board. I'm not even sure white boards were around at that time.
Anyone like Jacquie Lawson cards?
Gotta restart and install updates.
@Phrancis Well if you're unlucky you got a phishing mail
if you're lucky you get 25% off on every ride you do on trains in Germany
I'm voting to close this question as off-topic because it is an identical duplicate of a Stack Overflow question. Please don't cross-post if your question is accepted on the original site. — Simon André Forsberg 12 mins ago
@CaptainObvious duplicate from SO, please close.
@Vogel612 Now all I need to do is buy a plane ticket for Germany so I can claim my rebate :D
@Phrancis Wonder if you can go there by train...
18:20
Yoo Hoo, I found how to trick the Review queue into giving me a review on a deleted question.
Just choose No Action Needed.
@skiwi have fun crossing the atlantic by train!
@Hosch250 you do know there's a skip button?
Sternwheeler.
@skiwi Well, AFAIK they have not built a train bridge crossing the Atlantic ocean ;)
@Vogel612 But that won't give me the review.
@Vogel612 Or via Russia...
18:22
there isn't a full land-bridge, but that'd probably be the "best option"
Want to get shot down over Ukraine?
@Hosch250 Trains generally don't get shot down
Well, shot at then.
you don't actually have to go through ukraine
you can go through poland
which is about 600km north if my geography is still okay
I like you. We could always use more VBA Reviewers on Code Review if you get tired of SO. — RubberDuck 1 min ago
4
18:29
OK.
Travel agencies typically don't recommend to use trains in Germany. They had some complaints about that a few years ago
@JeroenVannevel What would you recommend I do if I need to take a class this semester that the U decided to cancel on a whim?
yay, one of my answers have reached 9 upvotes, now I am pretty much guaranteed a 10th!
2
@Hosch250 what's the exact situation?
@JeroenVannevel oh? why that?
18:32
I have a class in my schedule that I should take this year.
I have to register early because the U is doing upgrades later this year.
Apparently they completely killed the class.
@Vogel612 1939, never forget
that's a few years ago???
I work with a logarithmic scale on my timeline
@Hosch250 Talk to your advisor? They can't just do something I believe without reasonable substitute, that includes students who are studying non-nominal
@skiwi Taking a different course instead.
18:36
But you just said that you "should" take that class this year?
This is ridonculous.
Well, I take take it next spring.
18:51
I agree that there isn't any silver bullet solution for this; but if you perform Code Reviews, then this is a good place to spot and have the erroneous approach corrected. — Stephen Byrne 22 secs ago
0
Q: is this implementation of the mapper pattern correct?

xerxesIn the current project that I am working on, we are using dapper to query the database and sometime when mapping from dynamic types to concrete types we end up with a messy block of code. I created a folder called mappers and have created an Interface<T>, an abstract class inheriting from that i...

Still haven't written any code today.
19:07
It happens. Keep taking deep breaths. Maybe go for a walk.
@nhgrif Me neither.
Yeah... I just got back from lunch.
The coworker next to me can create inherited controls no problem.
He committed, I checked out his commit, still no luck.
So it's a VS problem for sure...
0
Q: HTML5 Video player

pertpoertI do HTML5 Video player with some controls. I have a button, where I change classname for make play, pause or replay button. I have a mute/unmute button, volume range slider, timer and fullscreen mode button. Maybe I can do some functions better or faster, and also, maybe I need to change commen...

0
Q: SQL Server to MongoDB Template

Fred LackeyLooking for feedback on a set of templates I've just created. I'm planning on converting them to Yeoman but want to make sure they're ready for prime time before doing so. They are currently in CodeSmith Generator format. Their main goal is to generate the guts of a MongoDB / Mongoose / Expres...

0
Q: Assigning default values from envvar in node

msanfordWhen attempting to set default values for parameters that may exist in environment variables in JavaScript, I often see this pattern: var lag; try { lag = process.env.THROTTLE_LAG; } catch ( e ) { lag = 100; } I don't like it, but I can't immediately see a more elegant alternative. T...

0
Q: Is there a better way to write this Lodash chain?

WHITEB0XI am mainly trying to avoid the nested forEach statements and try to move towards a lazy evaluation type solution http://jsfiddle.net/p2odrwat/ var skus = [{ "id": 25175837, "giftOptions": 1, "rmsSkuId": 53750485, "available": 1, "backOrder": "", "channelId": 1, ...

19:49
I'm voting to close this question as off-topic because this is about optimizing working code and should be moved to codereview.stackexchange.comHuangism 1 min ago
20:17
1
Q: Toy virtual machine

AlexanderI am a web developer, trying to have fun with C++11, so any positive/negative feedback is very welcome. This is a toy virtual machine with 3 registers and 3 commands: vm/vm.h #ifndef VM_H #define VM_H #include <iostream> #include <vector> #include "vtypes.h" namespace violet { class Vm...

Taking my case for Git to the director next week. It just got approved by my manager. =)
@RubberDuck wait, what? You don't use git?
@SimonAndréForsberg We don't use any VCS at all.
@RubberDuck ¤"()=%¤"?%(¤!"=)(! Oh dear!
6
Yeah. That ^. I know.
20:29
-1
Q: Simple Ruby Refactoring

Andrew GarciaI would like to know some different ways to write this: def check_platform_id(params) if self.platform_id != params[:platform_id] self.platform_id = params[:platform_id] end end

Hour 8.5... Lines of code: 0...
It's still broken, but I finally tricked it into letting me create the control...
@nhgrif Try reformat PC... go back to windows save point?
format c:\ /y
Doesn't work since XP btw.....
I set library as startup project then launched it using visual studio... So visual studio launches an instance of itself.
In the new instance, I can create inherited control. Cannot in original instance.
Weird.
20:41
Exactly.
Someone give some input on this?
@Phrancis See Jasons latest comment. He has completed the program and now he wants to extend its functionality to be more robust and handle different types of input. — Mathemats 20 hours ago
To me it's still off-topic
Help me understand — why would anyone ever design anything like this?
3
Q: Split string in chunks preferable at spaces

Thomas SchremserI'm working on a tool to import data from one database to another. One requirement is that I have to split a string from one source field into three (shorter) fields at the target. If possible the string should be split at a space character. If the string doesn't fit completely into the target fi...

@Mathemats I agree with Phrancis. We are both Code Review regulars. Specific requests to add functionality to a project is not on-topic on Code Review. The keywords in Jasons comment is "except the fact that..." — Simon André Forsberg 1 min ago
@Mathemats changing (or extending) the behavior of code is off-topic on CodeReview. For more information, please see the help center. — Vogel612 1 min ago
20:58
0
Q: Implementatin of path form a root to given node in binay tree

tejaBased on the soultion proivded in for this question , I have written non recursive java code to find the path form to to a given element in a binary tree.This code is working for all the elements except root. Is this the correct implementaion of the algorithm provided? Please check and suggest ...

@200_success Having the same problems understanding it as you...
Why do you have Name1, Name2, Name3? Is there also, or will there ever be Name4, Name5, etc...? Are you sure that's how you want to structure it? Perhaps a one-to-many relationship is something to consider? — Simon André Forsberg 40 secs ago
I'm kind of tempted to close it for violating the do-you-want-it-to-be-good-code rule.
@SimonAndréForsberg @200_success I think the purpose in that question doesn't make sense, but that doesn't make it an invalid question, does it?
@200_success the OP might not be aware of the one-to-many possibility. I know I wasn't a couple of years ago. God, that change in my database helped clean up my queries!
@skiwi Well, he's taking a good schema and mangling it.
I don't think it's about one-to-many. It's about word-splitting for a long line.
21:08
I think it's completely fine to not support users doing nonsensical things as a personal opinion, but I don't think you should make the choice for others by closing it
@Jesper I'm not so sure about that. It has been cross-posted to Code Review now though, but might be closed there: codereview.stackexchange.com/questions/82607/…Simon André Forsberg 39 secs ago
@skiwi agreed. but I hope he will provide a good reason for why he is doing what he is doing
@SimonAndréForsberg I'm hoping the same... though I can't think of (m)any
Maybe he wants to print the company name on max width 50 and wants to solve that problem on the database side? Just guessing
0
Q: Reading and Converting XML File to Array

Howdy_McGeeI'm using WordPress ( PHP Based Platform ) and I'm trying to read an external XML File, convert it into a usable array, then compare two arrays - one from the xml file and another from an options database. I've coded it so that it does work but it just looks messy. I'm not sure if it's my naming ...

Anyone ever used ?
21:13
@RubberDuck For an hour maybe... (Should've used it more for the homework, I know!)
Company wants me to pick up a course. This looks interesting. coursera.org/course/devdataprod
I think R is worth it to learn
Statistics == Doing cool things with data
3
That. ^
I have a hard time using any language that uses 1-based indexing.
Do any?
21:20
@200_success I still count from 1 to 10 in English ;-)
0
Q: Preparing a walkthrough : Freeze effect :s

TchiI have a method that load my walkthrough view. So I have my view controller composed of a scroll view. And others views controllers used only for the walkthrough. ( maybe I should used xib uiview instead of uiviewcontroller ). And when I'm on the viewDidWillAppear, i'm calling this method : /**...

6
A: IBDesignable UICheckbox

nhgrifIn playing around with this, I noticed a few things I didn't particularly like: This picture represents the first problem. Setting the background color fills in the entire rectangle, but should probably only fill in the circle. We can fix this as such: Add a private variable to hold the v...

This is really an impressive (self)-answer @nhgrif! ^
Deserves more attention
21:43
Yes, it looks like the assignment is to implement a map. And yes, the poster's implementation most definitely is not O(1) for an unordered map or O(log n) for an ordered map, it's O(n) as it's doing simple linear list-searches. This question would be much better suited to CodeReviewaruisdante 37 secs ago
@skiwi Thanks. I was actually just looking at that Q&A. I'm part of a local group called "CocoaHeads" that meets once a month. Each month, someone does some sort of presentation about iOS/OSX development. Last night someone presented some stuff about IBDesignable stuff. I told the group I had a project somewhere that I'd email out to the group.
0
Q: File-to-fully qualified class name function

David DaedalusMy instincts are telling me a seasoned Scala programmer will find my code less than optimal. As will no doubt be obvious, I'm a Java guy who has just started in with Scala. Is there a more 'functional' way to accomplish this that I'm missing? /** * takes a file object and returns a string rep...

0
Q: const_cast of std::mutex in 'get' member

Dan AllenLook particularly at the const_cast in the member getValue(void). Any comments? It seems the best solution me. Locking/unlocking a mutex is certainly a non-const operation. #include <mutex> class ThreadSafeThing { public: ThreadSafeThing(void); const std::string getValue(void) const;...

22:07
Of course. How I can post a little movie make with QuickTime ? — Tchi 7 mins ago
22:33
0
Q: Address-Book application

user2029426I would really appreciate if you gave me a review to my small application. https://github.com/skypper/Address-Book

148 days since graduation was announced
this is really a question for codereview.stackexchange.com. — Claies just now
0
Q: Can I get rid of the unsightly call to puts?

Devon Parsons# Comment: You can iterate through any number of Enumerables in lockstep e = { numbers: 1..10, letters: %w(a b c d e f g h i j), notes: %w(do re mi fa so la ti do), phonetic: %w(alpha bravo charlie delta echo), rainbow: %w(red orange yellow green blue indigo violet) } # Tit...

23:01
@200_success What better way to increase the likelihood of off-by-1 errors than to design part of your language in such a way that you think prevents off-by-1 errors...
0
Q: How to properly create reusable class in Objective-C?

PahnevI am trying to create a class that takes a screenshot of the screen, makes it blurry and saves it to NSUserDefaults. At first I was using simple method to get the screenshot, UIImage* imageOfUnderlyingView = [self.view convertViewToImage]; but it was pretty slow so I went and found something ...

Anyone ever had experience with a computer making a grinding, rattling sound, and having to be force quit to regain control?
My computer just did this for the second time, and the auto-repair failed.
A computer is made of many parts. What part is making the noise?
The fan? Or the harddrive?
I ran a scan with HP's guidance on the hardware, and they all passed.
It is not the fan, I suspect the HDD.
Unless it is the speaker, but I don't think so.
Unplug the speakers.
23:15
It is a laptop.
The closest I could come is disabling the drivers.
Then turn them off.
Next time I'll try.
Given that it's a laptop, my guess it's that it's almost certainly the harddrive.
@Hosch250 How old is the computer?
That is what the tech thought.
A little over two years.
I have 265 days of warranty left, and I bought 3 years.
Anyway, I am getting a box valid for 60 days for a free return to have it checked up.
23:21
I'd guess your warranty won't cover this.
Yes, it does.
It covers everything up to accidental spills.
You don't know until they actually have it and they're on the phone telling you it doesn't cover it.
Accidental spill is or isn't covered?
Well, then maybe they'll cover it.
It isn't a spill.
23:24
I know.
But this sort of damage typically comes from a fall.
It didn't fall.
Or it's in your backpack on the bus on the floor and someone accidentally kicked it.
I'm an online student, it doesn't go in a backpack.
It sits on my table must of the time.
@Hosch250 I don't mind it. I'd say colors and icons are more of a personal taste so the fact that I haven't noticed the points you mentioned shows that I didn't mind them really :) it will take some time to mature for sure.
It doesn't matter what actually happened. The point is, if this is a hard drive problem and the HP software says the hard drive is fine, then it's probably physically damaged.
23:25
Morning all
Fat chance that will be covered
OK.
@Mehrad Morning.
And if it's physically damaged, they tend to not cover that. They're not just going to take your word about how it got broke.
@Hosch250 A common problem I've heard of with laptop users is that they will often put it on a blanket or some surface that can conduct heat really well.
@Mehrad Good morning!
@SirPython I've heard of that.
23:26
It could happen in a car ride in the trunk going over a speed bump, etc.
It just sits on my wooded table all day every day.
@SirPython If it's making a grinding sound, it's most likely not from overheating... though overheating would more likely be covered.
The only time I've had it in a car was last May when I went to an MS class.
It is February.
Maybe your desk is made out of a recycled Ent and the bastard ruined your laptop
who knows
@JeroenVannevel My great grandfather or some relation of my mothers made it.
He made my chair too.
23:28
@Hosch250 It doesn't matter how it actually broke. Moreover, the initial damage could've happened long ago and the constant use eventually finally did in the small damage dealt earlier.
Maybe the Ent died 100 years ago
Yes.
Who's to say it didn't happen
@JeroenVannevel Me.
@nhgrif I understand.
But it doesn't matter how it happened. If it is physically broken, HP will most likely assume that it became physically broken via some method that isn't covered by the warranty, and they'll proceed to not cover it.
@Hosch250 What OS?
Windows?
23:29
Windows 8.1
It came with 8, but I updated it.
@nhgrif Did you even have to ask? ;-)
It is a top-end computer, and Windows 8.1 is less resource intensive than 8 IIRC, or pretty close, anyway.
@SirPython Sorry if I seem a troll, but if 10 doesn't shape up, I'm staying with Windows 8.1 if I can get a 10 license to keep.
And if I can't, I'll probably lose my license when I reset next.
So...
@SirPython I have a Dell with Ubuntu on it.
@nhgrif > I don't completely understand the part of taking the screenshot, so if there is anything that should/could be better I will gladly look at it.
> I don't completely understand the part of taking the screenshot, so if there is anything that should/could be better I will gladly look at it.
He's not asking for us to explain the code.
23:33
OK.
He just says he doesn't understand it. And if you have implemented code you don't understand, that's the code that most likely has room for improvement.
Just because you copy&pasted from the Internet doesn't mean it's good code.
Of course.
But that isn't "his" code then.
At what point would it become his code then?
Once he edited it to suit his problem better.
I have 2-3 sections in my code from SO answers that I don't consider my code.
Define "better"?
23:36
Type that in Bing and see the answer.
The code does what he want it to do
Or Google, if they have it.
What do you want more?
@JeroenVannevel Maybe it does more than necessary.
Its problem is being slow, that's why he's here in the first place
"Maybe"?
23:36
But fine, I'm not voting on it anyway, no need to debate it.
I'm just curious on where you think the line is for your code versus not your code.
I mean, I'm not CV'ing.
I don't know myself.
I just know that when I copy/paste code direct from the internet with no modification, it isn't my code.
I mean... let's say I need an app that does X. If I find the code on github for an app that does X and download it, that's not my code, right?
Nope.
But say, you understand the logic of the code, change variable names to suit your project, change the logic to suit your project, even just a bit, I would say it is partially your code.
But let's say I don't find an entire app. But let's say my app needs to consist of two classes. I find ClassA on github and ClassB on github. I put ClassA and ClassB in my AppX. There's basically no other code except these two classes. Is AppX my code?
23:39
If the rest is already written as you would write it (i.e. a closing brace), then you can claim that too.
Sort of, presumably you have to write some code to merge them and make them work right, or use those classes somehow.
I would say it is your app, but not necessarily your code.
So, if you copy/paste a closing brace from the internet, that could be your code.
What if I need to create ClassA. It needs to have these 5 methods. I find all 5 of these methods (individually) through StackOverflow, and I copy and paste from 5 different SO answers into the class I've created. Now I'm putting that class up on CodeReview?
I did that with a Linq method in C#.
ClassA exists as is no where else in the Internet (to my knowledge)
I don't count that as my code.
So, ClassA as a unit is yours, but not its code.
I inserted a RemoveAll for ObservableCollection in my app.
But could I post that on CodeReview as "my code"? I am the "owner" or "maintainer" of that class.
23:42
I don't know, presumably.
Personally, I would maybe take credit for the class, but not for the methods.
I feel guilty even about copy/pasting a statement from the documentation.
I'm not asking about what you ethically claim as being the author of. I'm asking about what would or wouldn't be within CodeReview's scope.
We don't let people post OPC.
Oh, yes, you could post that here.
Probably.
If that code can be found all over the internet, I don't count that as anyone's code, so yes, you can post it here.
If it is a specialized class only found on the internet in the one other place that you found....
In this specific question, what if this guy's "takeScreenshot" method was basically a complete copy & paste of my screenshot code on CodeReview?
8
Q: Unhandled Exception handler that captures a screenshot

nhgrifSo, whether you're still in the development stages or your app is already on the app store, you always hope your app isn't crashing. But if it is, you want to be sure you've got good crash reports, right? Moreover, if your app is on the appstore, it may not be sufficient to wait around for Appl...

Well, he could link to it, but he could not ask us to improve it unless he made some improvements already.
My code does 3 distinct things.
23:47
@nhgrif I had a strange dream of that exact situation happening to me.
Maybe his instance only needs two.
1) Take a screenshot.
2) Create a well-formatted date string.
3) Saves a crash report to NSUserDefaults.
His does 3 distinct but slightly different things.
And, he could adjust it to work with other parts of his app.
1) Take a screenshot.
2) Blur the screenshot.
3) Save blurred screenshot to NSUserDefaults.
If my "take a screenshot" code is well written and does exactly what he needs, why shouldn't he be allowed to post a snippet of code that does something that he wrote and what he needs it to do just because step 1 is copy&pasted from my implementation?
I don't know.
Presumably he could split it into methods and post the second and third.
23:50
But then he's making a very bad assumption--that my screenshot code--which has received no meaningful reviews--is implemented perfectly and is not in need of review.
And while that would be a great compliment, I certainly never make that assumption about any code I ever write, and definitely don't make that assumption about code I find online.
I automatically assume the first code I write is perfect. Any further improvements are only possible because a timelord has travelled back in time and added new features to the language I was using.
You're not Jon Skeet.
@JeroenVannevel Is incredibly vain.
Jon Skeet's code is better too, partially because he isn't vain.
@JeroenVannevel Hasn't Code Review taught you otherwise? ;-)
@Hosch250 Way to suck the fun out of my jokes
23:58
It sure has taught me otherwise.
Although, I do agree that that is not a bad thought to have. That way, your self-esteem can stay high when you are running to problems. (And then can get completely beat down when you post it here)
00:00 - 16:0016:00 - 00:00

« first day (662 days earlier)      last day (3653 days later) »