archived
stringclasses
2 values
author
stringlengths
3
20
author_fullname
stringlengths
4
12
body
stringlengths
0
22.5k
comment_type
stringclasses
1 value
controversiality
stringclasses
2 values
created_utc
stringlengths
10
10
edited
stringlengths
4
12
gilded
stringclasses
7 values
id
stringlengths
1
7
link_id
stringlengths
7
10
locked
stringclasses
2 values
name
stringlengths
4
10
parent_id
stringlengths
5
10
permalink
stringlengths
41
91
retrieved_on
stringlengths
10
10
score
stringlengths
1
4
subreddit_id
stringclasses
1 value
subreddit_name_prefixed
stringclasses
1 value
subreddit_type
stringclasses
1 value
total_awards_received
stringclasses
19 values
True
[deleted]
null
[deleted]
null
0
1317039751
False
0
c2mnpza
t3_kpwjl
null
t1_c2mnpza
t3_kpwjl
null
1427648291
1
t5_2fwo
null
null
null
True
AlyoshaV
null
I'm glad it's being recognized that Windows has some of the highest quality code in the industry.
null
0
1317039774
False
0
c2mnq0w
t3_krklz
null
t1_c2mnq0w
t3_krklz
null
1427648294
1
t5_2fwo
null
null
null
True
numbakrunch
null
Grep me no patterns and I'll tell you no lines.
null
0
1317039912
False
0
c2mnqc5
t3_krklz
null
t1_c2mnqc5
t1_c2mn8o1
null
1427648299
16
t5_2fwo
null
null
null
True
__j_random_hacker
null
It's only wasteful because (I assume) current Javascript engines don't optimise for the scenario of lots of identical functions being created. But I don't see why this would be very hard to do -- it's not much different than [string interning](http://en.wikipedia.org/wiki/String_interning).
null
0
1317039912
False
0
c2mnqc6
t3_kroia
null
t1_c2mnqc6
t1_c2mnorb
null
1427648299
6
t5_2fwo
null
null
null
True
IRBMe
null
> Monitors seem to be getting wider rather than taller. Even so, even an old 17" CRT can display a reasonable number of lines of code on the screen, and on a modern widescreen, there should be absolutely no problem. Besides, many widescreen monitors now can be configured to a [vertical orientation](http://i.imgur.com/od5KS.jpg) which is very good for coding on, especially when you have two. I very much doubt it would result in fewer bugs though, as taw claims. It really just adds more convenience.
null
0
1317039930
False
0
c2mnqdq
t3_krklz
null
t1_c2mnqdq
t1_c2mnooj
null
1427648299
0
t5_2fwo
null
null
null
True
icebraining
null
Not usually true. Non-modular code can't be reused, which leads to duplication of code everywhere. How often would you have to copy-paste e.g. strcpy if you couldn't abstract it as a function? Module declarations and imports are irrelevant compared to that. But hey, the structured programming debate was nly what, 50 years ago? :)
null
0
1317039937
False
0
c2mnqeb
t3_krklz
null
t1_c2mnqeb
t1_c2mn4qq
null
1427648299
2
t5_2fwo
null
null
null
True
buddhabrot
null
Note that iOS severely cripples bookmarks-saved pages (in terms of opening new windows from them, viewing pdf's inline), etc. Also, since iOS 4, bookmarked webapps are slower than in normal mode.
null
0
1317039978
False
0
c2mnqhd
t3_kpgmn
null
t1_c2mnqhd
t1_c2ma0cz
null
1427648299
1
t5_2fwo
null
null
null
True
[deleted]
null
TIL gcc works like this: cp hello_world.c hello_world chmod +x hello_world Too bad I can't get it to work with hello_world.c #include <stdio.h> main() { printf("Hello, world!\n"); }
null
0
1317040079
False
0
c2mnqq4
t3_krklz
null
t1_c2mnqq4
t1_c2mngyl
null
1427648301
0
t5_2fwo
null
null
null
True
IRBMe
null
My point had really very little to do with stylistic preferences, and anybody arguing about code style is really overlooking the main point: when looking at what is correlated with more bugs, complexity > amount of code > lines of code.
null
0
1317040084
False
0
c2mnqql
t3_krklz
null
t1_c2mnqql
t1_c2mnoq7
null
1427648301
3
t5_2fwo
null
null
null
True
vfr
null
I'd like to file a bug report, regarding the non-existance of the program.
null
0
1317040085
False
0
c2mnqqo
t3_krklz
null
t1_c2mnqqo
t1_c2mn8o1
null
1427648301
2
t5_2fwo
null
null
null
True
[deleted]
null
Correct. I'm glad to see you've finally understood the article now.
null
0
1317040249
False
0
c2mnr4n
t3_kkp4z
null
t1_c2mnr4n
t1_c2mm3rt
null
1427648306
1
t5_2fwo
null
null
null
True
doenietzomoeilijk
null
TIL... Thanks for clarifying. That makes a strong point for making actual apps instead of webapps, beyond the "normal" difference in performance you would expect from native vs web.
null
0
1317040300
False
0
c2mnr88
t3_kpgmn
null
t1_c2mnr88
t1_c2mnqhd
null
1427648307
1
t5_2fwo
null
null
null
True
gospelwut
null
Now I feel like a terrible person.
null
0
1317040375
False
0
c2mnrdv
t3_kqucu
null
t1_c2mnrdv
t1_c2mm8c2
null
1427648310
2
t5_2fwo
null
null
null
True
[deleted]
null
less code => better coder, isn't this basic stuff? as opposed to there being the same amount of bugs per line, and just more lines imply more bugs.
null
0
1317040421
False
0
c2mnrhn
t3_krklz
null
t1_c2mnrhn
t3_krklz
null
1427648310
1
t5_2fwo
null
null
null
True
annoymind
null
Boost accepted a logging library. It is not yet included but already passed the reviews. http://boost-log.sourceforge.net
null
0
1317040443
False
0
c2mnrja
t3_krd8f
null
t1_c2mnrja
t3_krd8f
null
1427648310
5
t5_2fwo
null
null
null
True
kenkirou
null
why?
null
0
1317040605
False
0
c2mnrv1
t3_krpem
null
t1_c2mnrv1
t1_c2mnmz8
null
1427648312
4
t5_2fwo
null
null
null
True
dallen
null
My first programming instructor used to always say, "Every program can be simplified by 1 line and has at least 1 bug in it. If you follow that to its logical conclusion you will find that the simplest program contains 0 lines of code and *still* has a bug."
null
0
1317040707
False
0
c2mns3a
t3_krklz
null
t1_c2mns3a
t1_c2mn8o1
null
1427648315
3
t5_2fwo
null
null
null
True
le_kommie
null
You are of course right. I meant "more functional" in the sense of "less OO" to demonstrate the point that in some of the OO languages the closures are implemented as instances of anonymous classes with just one method -- your function/procedure/whatever you want to call it.
null
0
1317040795
False
0
c2mnsb1
t3_krklz
null
t1_c2mnsb1
t1_c2mnonx
null
1427648317
0
t5_2fwo
null
null
null
True
barneygale
null
The title could refer to [pixel resolution](http://en.wikipedia.org/wiki/Image_resolution#Pixel_resolution), which is to do with the size of the smallest resolvable feature. For a small image this resolution is much smaller. Fractals may have infinite resolution, but raster images don't. I agree that it's a little absurd pointing out that it's high resolution, as any rasterisation process can be done at any resolution, but it's not incorrect per se.
null
0
1317040835
False
0
c2mnse9
t3_krpem
null
t1_c2mnse9
t1_c2mnja9
null
1427648326
28
t5_2fwo
null
null
null
True
bcorfman
null
Size is the best predictor of code quality ... not.
null
0
1317040862
False
0
c2mnsh1
t3_krpem
null
t1_c2mnsh1
t3_krpem
null
1427648319
5
t5_2fwo
null
null
null
True
metadave
null
Why? Dr Racket supports it via Ctrl-\
null
0
1317040908
False
0
c2mnskq
t3_kri4f
null
t1_c2mnskq
t1_c2mlylh
null
1427648321
3
t5_2fwo
null
null
null
True
metadave
null
Just happy to see progress on more "Lispy" languages.
null
0
1317041102
False
0
c2mnt0m
t3_kpk8d
null
t1_c2mnt0m
t3_kpk8d
null
1427648328
1
t5_2fwo
null
null
null
True
[deleted]
null
I end up using my monitor like [this](http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=File:Scrsh_multiView.gif). Then again, I was given a 16:9 monitor at work with a graphics card that only supports 4:3 resolutions, so everything is stretched. I hate my life.
null
0
1317041116
False
0
c2mnt1u
t3_krklz
null
t1_c2mnt1u
t1_c2mnqdq
null
1427648329
1
t5_2fwo
null
null
null
True
akoprowski
null
Fair point. I'll put this request forward to our team & we will see what can be done! (btw. Opa is open source so contributions are more than welcome! :)
null
0
1317041126
False
0
c2mnt2w
t3_kn8ra
null
t1_c2mnt2w
t1_c2mnmp9
null
1427648329
1
t5_2fwo
null
null
null
True
[deleted]
null
>I'm not sure of your reasoning for why not being able to see more code on the screen will necessarily result in more bugs. Why would that be? What kinds of bugs would I make that I would not if I was able to see about 10 more lines of code on the screen? If you have to ask you are not a programmer. If you have never had the need to find a bug in a program going like *"... it should go from here to there, but why is it going over there instead ..."* then you have never written a non-trivial software. >if an entire method can't fit on a reasonable sized screen, it's probably too large and that is an argument for refactoring it That introduces a new kind of bug. Putting a block of code inside a function is a good way to make the overall structure more clear, but the more levels of function calls your software has, the more likely it is for bugs to happen. >the amount of code there is also does not necessarily correlate with complexity, and it is far more often code complexity which leads to bugs. You didn't RTFA, did you? The overall premise that the OP was making was exactly this, the total amount of code is what matters, not the complexity. The title of the blog says it all *"Size is the best predictor of code quality"* If you have logical arguments that seem to indicate otherwise, then it's up to you to present data backing your claims. As it stands now, the measured data indicates your logic is wrong.
null
0
1317041187
False
0
c2mnt8f
t3_krklz
null
t1_c2mnt8f
t1_c2mnjfd
null
1427648331
-7
t5_2fwo
null
null
null
True
akoprowski
null
@mikehaggard: indeed I'm one of the odd users who got (fair amount of) exposure to Java EE some years ago and, frankly, it wasn't pretty @want_to_want: good question; btw. in Opa that would be 1 file, 1 line of code, 1 command to compile it & 1 executable as the result :)
null
0
1317041475
False
0
c2mntxa
t3_kn8ra
null
t1_c2mntxa
t1_c2mnkto
null
1427648338
1
t5_2fwo
null
null
null
True
A_for_Anonymous
null
The poster at the bottom is programmer porn.
null
0
1317041522
False
0
c2mnu1s
t3_krpem
null
t1_c2mnu1s
t3_krpem
null
1427648339
22
t5_2fwo
null
null
null
True
A_for_Anonymous
null
Objects are poor man's closures.
null
0
1317041578
False
0
c2mnu73
t3_kroia
null
t1_c2mnu73
t3_kroia
null
1427648345
12
t5_2fwo
null
null
null
True
geodebug
null
The policy should be a guideline for the leads, not the general coders. If a given component hits a size benchmark maybe some consideration should be given to splitting it up. If not physically, possibly logically. As always brains and experience should trump any guideline.
null
0
1317042067
False
0
c2mnviv
t3_krklz
null
t1_c2mnviv
t1_c2mmyac
null
1427648358
2
t5_2fwo
null
null
null
True
Teifion
null
Beat me by 2 hours. I saw this and thought "Reddit has to know!" I'm especially looking forwards to see what new features there are because nothing has been able to knock TM off my app list and I can't think of anything that I'd like added to it besides splittable windows and even then they're not a big deal for me.
null
0
1317042129
False
0
c2mnvp5
t3_krpio
null
t1_c2mnvp5
t1_c2mnepl
null
1427648357
1
t5_2fwo
null
null
null
True
x86_64Ubuntu
null
I wish someone would make a tutorial on HOW to design data models and structures. I can write queries and make my tables and so forth, but I don't know what a good model looks like, barring the normal normalization spiel.
null
0
1317042242
False
0
c2mnvyp
t3_kqucu
null
t1_c2mnvyp
t1_c2mlfaf
null
1427648361
1
t5_2fwo
null
null
null
True
IRBMe
null
> If you have to ask you are not a programmer. Don't be an asshole. I have been programming since I was 13, have a BSc in software engineering and have been programming for all of my career, using a variety of languages from Haskell to Java and C# to C, C++ and assembly language. > If you have never had the need to find a bug in a program going like "... it should go from here to there, but why is it going over there instead ..." then you have never written a non-trivial software. If the kinds of bugs you have a hard time figuring out are that your code isn't even taking the right branches, perhaps your idea of "*non-trivial*" software is pathetically naive. I'll tell you the kinds of bugs I have to find in my current job. I work on software which injects assembly code, C code and C++ into other software. It's about 200,000 lines of C++ code in the core product. So there are two varieties of bugs: bugs in the software itself, and bugs in the software that results from our software injecting code into it. The latter kind are especially tricky for numerous reasons: firstly, there's a level of indirection. We're not just debugging code that we wrote, we're debugging code that was *written* by code that we wrote. Secondly, due to the highly specialized nature of the code we inject, we frequently run into bugs in the original software that were only exposed by the injection of our code (e.g. undefined behavior which just happened to be working until we came along). Additionally, we do a lot of quite low level platform specific hacking with assembly code, so usually when there's a bug, it's a nasty stack corruption or buffer overrun bug. We have, several times, run in to genuine compiler bugs (some that were already reported, some that were new). It's rare, but we've run into 3 confirmed bugs in Visual C++ in the last year or so. A bigger monitor isn't going to get you very far debugging those sorts of problems, or even basic problems, to be honest. So I'll tell you how I debug software. I don't gape at it wishing I had a larger screen. I use a debugger. You're the one that sounds naive, if you think being able to see more code on the screen at once in *any* way aids with debugging. It does not, and if you debug code by staring at it, you're doing it wrong. Learn how to use gdb at least. It's leaps and bounds ahead of just starting at it, exclaiming "*Ugg ugg. Why code go over here and not over there like code supposed to?*" > That introduces a new kind of bug. Putting a block of code inside a function is a good way to make the overall structure more clear, but the more levels of function calls your software has, the more likely it is for bugs to happen. Of course there's a balance to be struck, but generally a good heuristic is to keep method lengths to about a screen length at most, and anything longer than that is a possible indication of an overcomplex method which requires refactoring. Note, by the way, that refactoring doesn't necessarily mean just sticking half of the method in one function and the other half in another function. That's an incredibly naive view of refactoring. Only sometimes does refactoring involve splitting a method into more methods. Often simplifying a method by refactoring it involves extracting a common repeated pattern. > You didn't RTFA, did you? The overall premise that the OP was making was exactly this, the total amount of code is what matters, not the complexity. I did RTFA, and also the paper it links to, but apparently you didn't. The paper doesn't talk about the size of a program, but the size of a *class*. It has nothing to do with the number of lines of code you write, as you naively assume with your simplistic understanding of the article, but to do with how large a class ends up being. More likely the case is that large classes have more state inside them, and the more state that a single class attempts to juggle, the more complexity (and no, I'm not talking about the measures of code complexity in the paper, but things like state complexity, which harder to get metrics about), which obviously results in more bugs. The more state in a class, the more ways there are to mutate it, the higher the chances there are of something going wrong. So no, I'm not disagreeing with the article. I'm disagreeing that your basic understanding of it, that more lines of code = more bugs, is ovesimplistic and misses the point of the paper entirely. Once again, lines of code don't correspond to amount of code, and amount of code doesn't necessarily correlate with complexity of code or number of opportunities for something to go wrong, but class size probably *does* correlate with amount of mutable state in a class, or other factors which *do* directly result in an increase in bugs. Save your snarky comments in future. Or at the very least, if you're going to be a condescending asshole, at least make sure you know what you're talking about first.
null
0
1317042302
True
0
c2mnw4a
t3_krklz
null
t1_c2mnw4a
t1_c2mnt8f
null
1427648362
9
t5_2fwo
null
null
null
True
imphasing
null
wat Dude, the only insanity going on here is your relentless trolling. WHAT IS THIS MADNESS.
null
0
1317042449
False
0
c2mnwi3
t3_kgl4f
null
t1_c2mnwi3
t1_c2m7ss4
null
1427648371
2
t5_2fwo
null
null
null
True
donnelkj
null
Any chance we can get a non-obfuscated version?
null
0
1317042465
False
0
c2mnwjh
t3_krpem
null
t1_c2mnwjh
t3_krpem
null
1427648372
20
t5_2fwo
null
null
null
True
bedintruder
null
[They are actually busy selling Pistachio nuts and taking shots at Zuckerburg in the commercial](http://www.youtube.com/watch?v=bUkR0MYLYZg)
null
0
1317042797
False
0
c2mnxec
t3_kp0u2
null
t1_c2mnxec
t1_c2m523k
null
1427648381
1
t5_2fwo
null
null
null
True
[deleted]
null
[deleted]
null
0
1317042878
False
0
c2mnxlo
t3_krklz
null
t1_c2mnxlo
t1_c2mnooj
null
1427648381
2
t5_2fwo
null
null
null
True
skilldrick
null
I've [written about that](http://skilldrick.co.uk/2011/02/zen-and-the-art-of-statefulness/) too :)
null
0
1317043085
False
0
c2mny4n
t3_kroia
null
t1_c2mny4n
t1_c2mnu73
null
1427648394
8
t5_2fwo
null
null
null
True
[deleted]
null
I also love python. TBH the whitespace indentation is my least favorite part of the language. Still it gives the language a distinctive look and I'll take one intelligent man designing a language over bland language design by committee any day.
null
0
1317043138
True
0
c2mny9u
t3_krpem
null
t1_c2mny9u
t1_c2mnmz8
null
1427648396
3
t5_2fwo
null
null
null
True
zck
null
Do you have a source for that claim? In my experience, that's not the case, nor does it seem likely to me. But I could be convinced otherwise. Either way, someone who's into Vim enough to want to define custom colored labels *most likely* uses many other features of Vim.
null
0
1317043231
False
0
c2mnyjf
t3_kravz
null
t1_c2mnyjf
t1_c2mmukm
null
1427648408
2
t5_2fwo
null
null
null
True
m0llusk
null
Have you ever had to debug code? Finding problems can be tricky. If you have to search the code and the formatting then the potential sources of error multiply. This is similar to the graphic user interface problem. They simplify some interactions, but at the cost of turning applications into eye-hand coordination test that can be difficult for some.
null
0
1317043317
False
0
c2mnysf
t3_krpem
null
t1_c2mnysf
t1_c2mnrv1
null
1427648402
-4
t5_2fwo
null
null
null
True
troymccabe
null
Look into profiling tools for your language of choice. Depending on the language you can get an incredible amount of information not only about which methods are being called, but how long they are taking to execute. Otherwise you can put log statements everywhere to see it. *shudder*
null
0
1317043426
False
0
c2mnz4q
t3_krklz
null
t1_c2mnz4q
t1_c2mnlo1
null
1427648412
1
t5_2fwo
null
null
null
True
tau-lepton
null
Yes it is.
null
0
1317043489
False
0
c2mnzba
t3_kq001
null
t1_c2mnzba
t1_c2mngnu
null
1427648414
2
t5_2fwo
null
null
null
True
kalmakka
null
Why is "stack.length = stack.length - 1" the same as "stack = stack[0 .. $-1]"? One is a mutation of an array, the other is a reassignment of the array object reference. The first one should be able to give a stack with good performance.
null
0
1317043690
False
0
c2mnzx0
t3_kqoz2
null
t1_c2mnzx0
t1_c2mfdtq
null
1427648419
2
t5_2fwo
null
null
null
True
kenkirou
null
I've programmed in python for a living for the last year, and I don't think that an incorrect indentation is harder to spot than for example a missing } in other language. You should give it a try :)
null
0
1317043844
False
0
c2mo0e2
t3_krpem
null
t1_c2mo0e2
t1_c2mnysf
null
1427648426
11
t5_2fwo
null
null
null
True
[deleted]
null
I'm taking both. No reason not to if you have the willpower to do the work.
null
0
1317043847
False
0
c2mo0ef
t3_kqucu
null
t1_c2mo0ef
t1_c2mhtkp
null
1427648426
1
t5_2fwo
null
null
null
True
hive_worker
null
Isn't this something that should be pretty self evident? Like saying "Diet is the best predictor of body fat"
null
0
1317043893
False
0
c2mo0jl
t3_krklz
null
t1_c2mo0jl
t3_krklz
null
1428192724
1
t5_2fwo
null
null
null
True
preshing
null
Of course there are low-resolution Mandelbrot programs. [This image](http://4.bp.blogspot.com/_rh0F0x8nGzM/So0sDSd3qpI/AAAAAAAAAF0/zcVulpxdUIc/s320/Mandelbrot_Haskell.png), for instance, is far from infinite resolution.
null
0
1317043894
False
0
c2mo0jt
t3_krpem
null
t1_c2mo0jt
t1_c2mnja9
null
1428192724
10
t5_2fwo
null
null
null
True
elperroborrachotoo
null
No, that's why it's *a slightly bolder interpretation*.
null
0
1317043916
False
0
c2mo0lw
t3_krklz
null
t1_c2mo0lw
t1_c2mniw7
null
1427648430
4
t5_2fwo
null
null
null
True
icec0ld
null
i was drunk when i read this the other night and it makes more sense that way....
null
0
1317044151
False
0
c2mo1al
t3_ko2wv
null
t1_c2mo1al
t1_c2lt7nd
null
1427648439
1
t5_2fwo
null
null
null
True
Timmmmbob
null
Interesting. What does the web browser show though? I'm guessing still the scary red security notice?
null
0
1317044156
False
0
c2mo1b4
t3_kp1b5
null
t1_c2mo1b4
t1_c2mnbpy
null
1427648439
1
t5_2fwo
null
null
null
True
noiserr
null
Actually, that's the whole reason why code blocks are defined by indentation in Python. It is easier to debug when you can trust the indentation is meant to be a code block. It is easier to see an indented block than to find a missing or one too many }. Also in a language which doesn't enforce proper indentation you can be completely thrown off by a bad indentation. How many times have you run into weird indentation in a piece of code someone else wrote? And how many times have you counted braces to make sure there are just the right number of them. Python resolves this problem completely. I think everyone has this apprehension when they first start writing Python, but you would be surprised by how quickly you realize how brilliant the idea of defining code blocks with indentation is. See you should be indenting your code properly in any language, but in many other languages you have to define code blocks with additional characters ({};..). It's redundant and unnecessary, it makes the code less readable and it makes you type redundant characters. You already defined your block of Java with an indentation, why do you have to use a ; and }?
null
0
1317044246
True
0
c2mo1k4
t3_krpem
null
t1_c2mo1k4
t1_c2mnysf
null
1427648441
24
t5_2fwo
null
null
null
True
davidquick
null
I think it's in reference to the code itself being a "high resolution" mandelbrot, which is dubious, but a legitimate statement I think. At least worth arguing.
null
0
1317044464
False
0
c2mo27t
t3_krpem
null
t1_c2mo27t
t1_c2mnja9
null
1427648447
1
t5_2fwo
null
null
null
True
pingish
null
I guess I need to read the visitor pattern, but my apples only get eaten. My apples are not sentient and do not accept me as a consumer.
null
0
1317044622
False
0
c2mo2q8
t3_kr0ir
null
t1_c2mo2q8
t1_c2mngx4
null
1427648450
2
t5_2fwo
null
null
null
True
[deleted]
null
[deleted]
null
0
1317044705
False
0
c2mo2zu
t3_krklz
null
t1_c2mo2zu
t3_krklz
null
1427648453
1
t5_2fwo
null
null
null
True
alekseykorzun
null
"So this partially backs up my hypothesis that the number of bugs can primarily be predicted only by the total lines of code." Actually, no it doesn't.
null
0
1317044768
False
0
c2mo37i
t3_krklz
null
t1_c2mo37i
t3_krklz
null
1427648454
3
t5_2fwo
null
null
null
True
roxm
null
It still makes no sense for an apple to have an 'eat' method. Apples don't eat. Minimally an apple should have a 'provideNutrients' function that can remove the nutrients from the instance and return them. And also, 'Sam' doesn't eat the food directly, he passes them to a method (possibly in a base class) that can apply the nutrients to his body. All 'Sam' does is chew and swallow.
null
0
1317044946
False
0
c2mo3sb
t3_kr0ir
null
t1_c2mo3sb
t1_c2mngx4
null
1427648459
1
t5_2fwo
null
null
null
True
mycatverbs
null
Don't actually know. Just trying it here, Chrome doesn't even implement ADH. Also, mod_ssl won't even start without a certificate specified, so I don't think you can get away without one at all anyway.
null
0
1317044988
False
0
c2mo3x4
t3_kp1b5
null
t1_c2mo3x4
t1_c2mo1b4
null
1427648460
2
t5_2fwo
null
null
null
True
bannerbruce
null
beard is the best predictor of code quality.
null
0
1317045007
False
0
c2mo3zl
t3_krklz
null
t1_c2mo3zl
t3_krklz
null
1427648460
25
t5_2fwo
null
null
null
True
knight666
null
Well let me show you a slightly extreme example then: for(int y=0;y<=gy;y++) { if((y&1)==0) { for(int x=0;x<=gx;x++) { verts[cc++]=-s + x*2*s/gx; verts[cc++]=perlin.Get(x*1.0/gx,y*1.0/gy)*10; verts[cc++]=-s + y*2*s/gy; } } else { for(int x=0;x<=gx;x++) { verts[cc++]=-s + x*2*s/gx - s/gx; verts[cc++]=perlin.Get(x*1.0/gx,y*1.0/gy)*10; verts[cc++]=-s + y*2*s/gy; } } } And this is corrected for tabs because they were all over the place. Now here's how I would refactor it: for (int y = 0; y <= gy; y++) { if ((y & 1) == 0) { for (int x = 0; x <= gx; x++) { verts[cc++] = -s + (x * 2 * s) / gx; verts[cc++] = perlin.Get(x * (1.f / gx), y * (1.f / gy)) * 10.f; verts[cc++] = -s + (y * 2 * s) / gy; } } else { for (int x = 0; x <= gx; x++) { verts[cc++] = -s + (x * 2 * s) / gx - s/gx; verts[cc++] = perlin.Get(x * (1.f / gx), y * (1.f / gy)) * 10.f; verts[cc++] = -s + (y * 2 * s) / gy; } } } I didn't even notice it at first, but there's duplicate functionality! The only difference between the if and the else is the first line. This is much more obvious in my refactoring.
null
0
1317045443
False
0
c2mo5ds
t3_krklz
null
t1_c2mo5ds
t1_c2mniug
null
1427648548
3
t5_2fwo
null
null
null
True
tresonce
null
that still doesn't mean that you can't put on your resume that you sat in the class. So long as you are truthful about what you actually did I don't see how that stops you from putting it on your resume... I would also contend that if you are seriously trying to get a job working with databases then this is NOT going to matter anyway :)
null
0
1317045477
False
0
c2mo5hr
t3_kqucu
null
t1_c2mo5hr
t1_c2mi8ia
null
1427648549
3
t5_2fwo
null
null
null
True
inkieminstrel
null
I didn't see it as "Here's something to enforce on your team" so much as "Here's something to look for in improving your own code." Keep it small. Keep methods short and to the point. Generalize whenever possible. Treat big pieces of code as code smell. "Blah blah blah" ~Blaise Pascal
null
0
1317045524
False
0
c2mo5nw
t3_krklz
null
t1_c2mo5nw
t1_c2mmtvy
null
1427648551
2
t5_2fwo
null
null
null
True
euyyn
null
Even if it did, what an asshole comment. As if the guy had some sort of insight the research community has not and will eventually discover.
null
0
1317045583
False
0
c2mo5uz
t3_krklz
null
t1_c2mo5uz
t1_c2mo37i
null
1427648553
3
t5_2fwo
null
null
null
True
JL235
null
I meant more to come up with a a DRY-vs-bugs kind of scale. I'd be interested in seeing studies which tried to quantify DRY, and using their definition, looked into seeing if there was a correlation to the number of bugs (and what things affected the number of bugs).
null
0
1317045640
False
0
c2mo62c
t3_krklz
null
t1_c2mo62c
t1_c2mnz4q
null
1427648555
1
t5_2fwo
null
null
null
True
[deleted]
null
[deleted]
null
0
1317045682
True
0
c2mo66u
t3_kq27q
null
t1_c2mo66u
t1_c2mbe5e
null
1427648562
-1
t5_2fwo
null
null
null
True
bobindashadows
null
> no worse than writing an evented server in C Doesn't sound "nice, easy-to-use" to me. Which was why I didn't include it when I said "major dynamic languages have nice, easy-to-use evented capabilities." And if you wrote it exactly like you'd write it in C, I'm not surprised it outperformed other dynamic languages, since you likely just used thin wrappers over C code. Without using any features which provide extra expressiveness, even the worst interpreter (PHP's, which is even slower than Ruby's) won't be slow.
null
0
1317045854
False
0
c2mo6qc
t3_kq27q
null
t1_c2mo6qc
t1_c2mngcm
null
1427648564
1
t5_2fwo
null
null
null
True
instantviking
null
Probably a minor point, but presumably your getters and setters would be covered by tests for other parts of your system, right?
null
0
1317045920
False
0
c2mo6y2
t3_kq001
null
t1_c2mo6y2
t1_c2mac44
null
1427648567
1
t5_2fwo
null
null
null
True
sysop073
null
I downvoted him and I loathe vim. People who think they're clever because they posted an anti-vim comment on a vim thread should go hang out on 4chan where that sort of thing is encouraged
null
0
1317046141
False
0
c2mo7pz
t3_kravz
null
t1_c2mo7pz
t1_c2mn0me
null
1427648577
3
t5_2fwo
null
null
null
True
poo_22
null
I've done some under linux, and opengl is cross platform so i think you'll have minimal issues once you get all set up.
null
0
1317046163
False
0
c2mo7sw
t3_kqqd5
null
t1_c2mo7sw
t1_c2mn3g1
null
1427648579
1
t5_2fwo
null
null
null
True
a_redditor
null
You should probably hop over to /r/learnprogramming for this.
null
0
1317046330
False
0
c2mo8dm
t3_krj30
null
t1_c2mo8dm
t3_krj30
null
1427648585
1
t5_2fwo
null
null
null
True
eriksrx
null
Information about the TopCoder Open can be had [here](http://community.topcoder.com/tco11/) And by god, is it humid in Florida.
null
0
1317046357
False
0
c2mo8go
t3_krtpc
null
t1_c2mo8go
t3_krtpc
null
1427648587
3
t5_2fwo
null
null
null
True
Bipolarruledout
null
Perhaps programmer turnover should be part of this assessment particularly those who go on to better paying and better managed companies?
null
0
1317046365
False
0
c2mo8i1
t3_krklz
null
t1_c2mo8i1
t1_c2mna5f
null
1427648587
1
t5_2fwo
null
null
null
True
Gotebe
null
That's IDisposable and using of C# / VB.NET. GC languages need deterministic resource de-allocation, and finally is a PITA, so good (albeit laaaaate) for Java. However, the motivating snippet is poorly written. It should read: InputStream in = createInputStream(); try { OutputStream out = createOutputStream(); try { /* Copy data here */ } finally { try { out.close(); } catch(IOException e) { //Prevent this exception from suppressing actual exception } } } } finally { try { in.close(); } catch(IOException e) { //Prevent this exception from suppressing actual exception } } IOW, resource allocation is outside the catch and if(stream == null) is not needed in finally. However, bonus points for dealing correctly with cleanup errors ;-). >There is one minor disadvantage to the try-with-resource statement, it is required to define the variable that refers to the object to be closed within the brackets after the try. That's actually quite fine. In fact, I'd argue that readData would be worse off if it could close the stream. Why? Because stream comes in open, but is closed out of the sight of the caller. Such state changes are best done at the same "code level": he who opens, closes, so outside readData. said close adds one more duty to readData, who, from "given a stream, do X", becomes "given a stream, do X *and* close stream". No need for that.
null
0
1317046393
False
0
c2mo8kp
t3_krrz1
null
t1_c2mo8kp
t3_krrz1
null
1427648588
18
t5_2fwo
null
null
null
True
MarshallBanana
null
> /r/programming is not a place to ask for help, run polls, rant, demo your app (unless your demo includes code or architecture discussion), or otherwise use as a captive audience. For that try /r/learnprogramming or StackOverflow.
null
0
1317046469
False
0
c2mo8tz
t3_krrop
null
t1_c2mo8tz
t3_krrop
null
1427648591
2
t5_2fwo
null
null
null
True
px403
null
But modularity will often make code bigger. Every once in a while, on my own projects, I have code burning parties where I tear out as much code as possible where retaining critical functionality. It is very common for me to collapse modules that were only there for some imagined flexibility that I never used. Yes, modularity is important for sanity, but I see the opposite problem far more often. When people break code up too much, (made of of 50 modules, 10 lines each, etc) it actually makes it harder to read, and nearly impossible to comprehend. I think modern computer science curriculum hammer modularity into our heads so hard that we tend to over do it, but at least we don't have to work with the piles and piles of spaghetti code anymore :-)
null
0
1317046487
False
0
c2mo8wf
t3_krklz
null
t1_c2mo8wf
t1_c2mmg5e
null
1427648593
4
t5_2fwo
null
null
null
True
okpmem
null
This would be true if business logic was in some unit. Typical OO designs spread business logic into hundreds of different classes. TDD is typically practiced by focusing on these units, instead of the interplay between the 100 or so classes which make up the business logic.
null
0
1317046535
False
0
c2mo92l
t3_kq001
null
t1_c2mo92l
t1_c2m9mji
null
1427648596
2
t5_2fwo
null
null
null
True
hiffy
null
`attr_accessor :foo, :bar, :baz` anyone? Also a fan of `delegates :foo`.
null
0
1317046550
False
0
c2mo94g
t3_krklz
null
t1_c2mo94g
t1_c2mn0xr
null
1427648600
3
t5_2fwo
null
null
null
True
Bipolarruledout
null
Don't forget scale ability. Well defined objectives should also be part of assessment.
null
0
1317046553
False
0
c2mo94s
t3_krklz
null
t1_c2mo94s
t1_c2mniw7
null
1427648600
1
t5_2fwo
null
null
null
True
bulldada
null
Last I checked, Ruby/Python didn't have high level constructs in the language for event driven programming? In both cases you generally use a framework or library (eventmachine/twisted). How is this different to PHP?
null
0
1317046612
False
0
c2mo9br
t3_kq27q
null
t1_c2mo9br
t1_c2mo6qc
null
1427648599
1
t5_2fwo
null
null
null
True
Bipolarruledout
null
This. Much more useful are practices that should *not* be used.
null
0
1317046740
False
0
c2mo9t1
t3_krklz
null
t1_c2mo9t1
t1_c2mmyac
null
1427648604
1
t5_2fwo
null
null
null
True
BitRex
null
Precompiled headers should alleviate some of that pain, right?
null
0
1317046759
False
0
c2mo9vr
t3_krd8f
null
t1_c2mo9vr
t1_c2mljyg
null
1427648604
2
t5_2fwo
null
null
null
True
px403
null
QuestionMarker is talking about the people that do: if(errorstate)printerror("omg error!"); ... int printerror(char* s){printf("error : %s\n",s);} Rather than just inlining the process. When you create special one line functions for every little thing you want to do, it greatly inflates the code and makes it more prone to bugs since you can never really read exactly what is going on unless you already know **exactly** what your 50 helper functions are doing.
null
0
1317046777
False
0
c2mo9y2
t3_krklz
null
t1_c2mo9y2
t1_c2mnqeb
null
1427648605
1
t5_2fwo
null
null
null
True
BitRex
null
That warning should be on by default. It's these kinds of sharp edges that give C++ a bad rep.
null
0
1317046801
False
0
c2moa1b
t3_krd8f
null
t1_c2moa1b
t1_c2mlx2p
null
1427648607
1
t5_2fwo
null
null
null
True
Bipolarruledout
null
Good luck getting management to buy into that.
null
0
1317046847
False
0
c2moa7g
t3_krklz
null
t1_c2moa7g
t1_c2mnviv
null
1427648609
1
t5_2fwo
null
null
null
True
fbg00
null
The basic result cited is that length of code predicts (by positive correlation) the number of bugs in the code. I find it wonderfully ironic that this result is presented in a "long paper".
null
0
1317046912
False
0
c2moaga
t3_krklz
null
t1_c2moaga
t3_krklz
null
1427648612
1
t5_2fwo
null
null
null
True
Gotebe
null
Looks like the concept of aggregation in COM. 199X again, anyone? :-)
null
0
1317047005
False
0
c2moasz
t3_krouy
null
t1_c2moasz
t3_krouy
null
1427648618
2
t5_2fwo
null
null
null
True
bonzinip
null
_ = (255, lambda V,B,c: c and Y(V*V+B,B, c-1)if(abs(V)<6)else(2+c-4*abs(V)**-0.4)/i) v,x=1500,1000; C=range(v*x); import struct; P=struct.pack; M,j ='<QIIHHHH',open('M.bmp','wb').write for X in j('BM'+P(M,v*x*3+26,26,12,v,x,1,24)) or C: i,Y=_ j(P('BBB', *(lambda T:(T*80+T**9*i-950*T**99, T*70-880*T**18+701*T**9, T*i**(1-T**45*2))) (sum([Y(0,(A%3/3.+X%v+(X/v+A/3/3.-x/2)/1j)*2.5/x-2.7,i)**2 for A in C[:9]])/9)))
null
0
1317047305
False
0
c2mobyr
t3_krpem
null
t1_c2mobyr
t1_c2mnwjh
null
1427648633
29
t5_2fwo
null
null
null
True
Bipolarruledout
null
Spatial reasoning.
null
0
1317047334
False
0
c2moc2c
t3_krklz
null
t1_c2moc2c
t1_c2mnjfd
null
1427648634
1
t5_2fwo
null
null
null
True
blueboatjc
null
Umm... this has been there for months, if not years. Go to any "Page" of a restaurant and you can see this information.
null
0
1317047533
False
0
c2mocty
t3_krtok
null
t1_c2mocty
t3_krtok
null
1427648644
2
t5_2fwo
null
null
null
True
shimei
null
It's also not very hard to type in other editors either. e.g. in vim, it is Ctrl-k l* in insert mode.
null
0
1317047561
False
0
c2mocxo
t3_kri4f
null
t1_c2mocxo
t1_c2mnskq
null
1427648645
4
t5_2fwo
null
null
null
True
[deleted]
null
Word. I get tired of all the eye-rolling around normalization, dealing with data models that aren't even in 2nd normal form, the inconsistent and duplicate data... and somehow pointing out that _all of this is known and completely avoidable_ makes me the bad guy.
null
0
1317047745
True
0
c2modoa
t3_kqucu
null
t1_c2modoa
t1_c2mlerl
null
1427648655
2
t5_2fwo
null
null
null
True
[deleted]
null
Wait, their sample size was one project?
null
0
1317047779
False
0
c2modt3
t3_krklz
null
t1_c2modt3
t1_c2mnopj
null
1427648657
2
t5_2fwo
null
null
null
True
LenHolgate
null
Wasn't COM supposed to be going away? ;)
null
0
1317047899
False
0
c2moeau
t3_krouy
null
t1_c2moeau
t3_krouy
null
1427648662
1
t5_2fwo
null
null
null
True
dakboy
null
And sometimes, removing code [proves to be very beneficial.](http://www.folklore.org/StoryView.py?project=Macintosh&story=Negative_2000_Lines_Of_Code.txt&characters=Bill%20Atkinson&sortOrder=Sort%20by%20Date&detail=medium)
null
0
1317047900
False
0
c2moeb0
t3_krklz
null
t1_c2moeb0
t1_c2mn0ji
null
1427648662
3
t5_2fwo
null
null
null
True
gracenotes
null
Economists have a way of phrasing what happens when a metric is used in policy: [Goodhart's law](http://en.wikipedia.org/wiki/Goodhart%27s_law). It goes like "any observed statistical regularity will tend to collapse once pressure is placed upon it for control purposes." Although, to be honest, the software engineering process is a bit less complicated than the global economy.
null
0
1317047916
False
0
c2moecs
t3_krklz
null
t1_c2moecs
t1_c2mmyac
null
1427648664
2
t5_2fwo
null
null
null
True
shimei
null
The reason why people are just talking about Rust's *keywords* of all things: > In any language design, the total time spent discussing > a feature in this list is proportional to two raised to > the power of its position. > 0. Semantics > 1. Syntax > 2. Lexical syntax > 3. Lexical syntax of comments [Wadler's Law](http://www.haskell.org/haskellwiki/Wadlers_Law) Personally, I'm more interested in the fact that Rust is motivated by real PL research rather than the number of keywords it has. Especially if the language is extensible, the number of keywords is moot.
null
0
1317048038
False
0
c2moevj
t3_kos4z
null
t1_c2moevj
t1_c2m32nz
null
1427648671
2
t5_2fwo
null
null
null
True
elperroborrachotoo
null
I am sure there are over a dozen other factors going into the quality of code, and quality / longevity of staff is certainly a factor. We should not expect to much from one study, though. The core of this specific study is a mistake (failed to control for an important factor) in multiple previous studies. If that factor wasn't recorded, this often makes the previous studies null and void. Attemting to much in a single study opens you up to a lot more potential mistakes. It also hinders reproducibility.
null
0
1317048151
False
0
c2mofat
t3_krklz
null
t1_c2mofat
t1_c2mo8i1
null
1427648676
3
t5_2fwo
null
null
null
True
shimei
null
The idea of programming language paradigms is [bunk](http://www.cs.brown.edu/~sk/Publications/Papers/Published/sk-teach-pl-post-linnaean/). There are better way to talk about languages than these broad zoo-like categorizations.
null
0
1317048172
False
0
c2mofdm
t3_kos4z
null
t1_c2mofdm
t1_c2m6t4x
null
1427648677
3
t5_2fwo
null
null
null
True
[deleted]
null
This was me. I was cocksure object-oriented databases were going to replace stuffy, boring, old suitable-for-COBOL "relational" databases, and the programming world was clearly going object-oriented, so why fight it? Fast forward a decade, and I was right about programming going object-oriented (not that this was a brilliant insight circa 1995...) but I eventually encountered all the headaches with ORMs that are so well-documented by now. Then a funny thing happened: I learned SQL. To make matters worse, I started revisiting some neglected aspects of my education, like set theory and first-order logic. I started playing with obscure functional programming languages like OCaml (this was still a decade+ pre-Scala). The next thing I knew, relational algebra made perfect sense to me, SQL implemented it poorly but usably, and now it's _objects_ that seem pretty much completely whack to me. To get a flavor of what I mean about relational algebra and SQL, check out [SQL and Relational Theory](http://www.amazon.com/SQL-and-Relational-Theory-ebook/dp/B0026OR30I/ref=sr_1_2?ie=UTF8&qid=1317048158&sr=8-2). It's very good stuff.
null
0
1317048183
False
0
c2moff8
t3_kqucu
null
t1_c2moff8
t1_c2ml6wc
null
1427648679
4
t5_2fwo
null
null
null
True
naasking
null
From the page you linked: [Cyclomatic Complexity(CC) effectively useless](http://www.leshatton.org/Documents/TAIC2008-29-08-2008.pdf). In fact, CC is correlated to lines of code, but lines of code is still the best metric.
null
0
1317048274
False
0
c2moft8
t3_krklz
null
t1_c2moft8
t1_c2mnooi
null
1427648683
3
t5_2fwo
null
null
null
True
[deleted]
null
[deleted]
null
0
1317048383
False
0
c2mog92
t3_kq27q
null
t1_c2mog92
t1_c2m9t72
null
1427648688
0
t5_2fwo
null
null
null