« first day (1743 days earlier)      last day (3239 days later) » 
00:00 - 18:0018:00 - 22:00

6:00 PM
I was told that === is how javascript manages to not be stupid, until I discovered that.
 
user114359
This is a dupe, need some CVs:
 
user114359
0
Q: Should I spend time cleaning code I don't touch?

ZibbobzOne piece if advice I've seen frequently on this SE is the "Boyscout Rule", which is: "Always check a module in cleaner than when you checked it out." Boyscout Rule Good words to live by when coding - right now though, I'm waiting on my co-workers to finish correcting issues from our last ...

 
for some reason "good Javascript coders never do that, ever" isn't a good enough counterargument
 
@Snowman Omg I actually have CVs today
 
@durron597 In all fairness, seldom are you going to be doing that kind of comparison.
 
user114359
6:01 PM
@durron597 I saved a few just in case. I didn't review a full 20 after midnight UTC
 
yep, using + on anything other than a number or string might as well be undefined behavior
 
@Snowman I actually did a lot of "leave open" today
 
user114359
@durron597 I did on a couple too now that I think about it
 
like dereferencing pointers without a null check; we know not to do that in C++
 
@Ixrec If it were illegal behavior, I would like the language more.
@Snowman Just looked, I did 5 4 leave open today and one leave open audit
 
6:03 PM
@durron597 This one is actually a bit more compelling:
> xs = ['10', '10', '10']
> xs.map(parseInt)
[10, NaN, 2]
 
@durron597 but unlike null pointer issues, that's a mistake that no real coders would ever make
that one I really do need to figure out
 
Yeah, couldn't copy/paste it. It's in a video.
Try it in Chrome's console.
 
I think durron gave that exact example the other day, it definitely does that, though I still have no idea why
in all seriousness, has anyone here actually written Javascript code besides me? most of these standard lolwut snippets never come up in actual development
 
@Ixrec yes, but not for years
 
I've written some pure html/javascript websites and with GWT
 
6:08 PM
I swore off web development in 2008
 
that would explain it, I hear things were much, much worse back then
 
jquery was only just starting to become popular in 2008.
 
wow, three years before ES5 was published
 
I was using script.aculo.us for most things.
don't know if anyone uses that anymore
 
All of the examples above still produce the same result. The problem, of course, is that fixing them breaks compatibility.
 
6:10 PM
I'd consider ES5 strict mode and a linter ingrained in the build system/version-control/editor as mandatory for serious development these days
 
If you're willing to overlook the warts, JS is actually a very cool language. Type annotations everywhere makes a curly brace language extremely verbose. It's a joy not to have to type them.
 
it's hard to find a popular language that makes function literals, object literals and (de)serialization as trivial/effortless as they are in JS
 
meh, a joy that is quickly drowned out in runtime errors.
2
 
verbosity is not a problem. maintainability is.
 
the new-ish systems programming languages like Go and Rust come pretty close though, would be cool to try one of those in real code someday
verbosity is pretty strongly correlated with maintainability
 
6:14 PM
To be fair, my approach to the whole SPA thing is probably to use something a little more formalized like TypeScript, while EF6 gets finalized.
 
I saw typescript the other day, and it looked palatable.
 
But Javascript has some really good ideas. It's a little bit like a small lisp with braces.
 
I'm hoping our proprietary junk gets updated to allow ES6 in the not too distant future
 
@Ixrec Right. The more verbose, the more maintainable. Thus why I like Java.
 
the more verbose, the slower to change
 
6:16 PM
You mean the more verbose, the more readable, don't you? Certainly not faster to develop in.
 
my productivity drops by a factor of at least 5 every time I go into C++ code, just because even the slightest change involves parallel modifications to at least two files (an .h and a .cpp)
 
@RobertHarvey The "slowness" of verbosity is solved by a good IDE
 
I've never really been convinced by the "my IDE can do it therefore it's easy" argument
maybe if we were talking about a Microsoft stack where everyone would be using Visual Studio anyway
 
There's something to be said for a bit of frontend study in a more expressive language. It wouldn't surprise me if you could double your productivity, and less code means less stuff to maintain.
 
"frontend study"?
 
6:19 PM
Java programmers are a dime a dozen, in other words. Scala programmers, not so much.
 
@RobertHarvey I totally disagree, but this is not something that isn't going to be settled via talking about it, as it's something that can be measured.
 
When you use daily the IDE magic. It really feels nice @Ixrec
 
maybe someday I'll be in an environment where IDE magic is actually a thing
 
@Ixrec What's the preferred IDE for javascript these days? Please don't say notepad++
 
@durron597 Isn't it whatever IDE you are using for the rest of your project?
 
6:21 PM
if we're going by what my coworkers use, Sublime
 
Visual Studio has JavaScript support now. So does Eclipse with the web dev plugins.
 
@ThomasOwens If all of the code you're writing is in HTML / CSS / Javascript
 
@durron597 I'd use Eclipse + the plugins.
 
our proprietary framework actually comes with an IDE built in said framework, but it's so poorly maintained that almost no one uses it
I'm still not sure why they bothered to make it at all
 
Eclipse does a nice job with Javascript, auto complete works
 
Sublime looks really nice.
 
everyone wants them to give us command line tools so we don't need to have that thing running all the time, but apparently command line tools are less secure than a broken IDE?
 
Heard good things about Sublime
 
Sublime looks like Notepad++ with extensions already baked in. It doesn't even call itself an IDE.
It calls itself a "text editor".
 
that's probably why people use it, lol
 
6:23 PM
Sublime looks cool but it seems like it has a learning curve
 
my personal experience with IDEs has been very mixed at best; I feel the extra layer tends to confuse and hamstring me more than it actually helps
again, probably because I'm not doing something super-standard and Microsoft-endorsed like ASP.NET web services or whatever
 
@Ixrec it is the learning curve
 
@Ixrec What do you use? Notepad++?
 
for Javascript, I use the aforementioned proprietary IDE thingy even though I'm constantly getting told to switch to Sublime
 
6:26 PM
the running joke is I'm literally the only one left in the company who does
 
@durron597 Not really.
 
the main thing keeping me from switching to Sublime is that even if I did switch, I'd still need the proprietary IDE up at all times to act as a Run button and a debugger, since infrastructure has provided no other way to do either of those things right now
 
@Ixrec If you're happy with Notepad++ I wouldn't expect Sublime to be a big improvement, but jsdt problably would be.
 
and I haven't seen anything in Sublime that would overwhelm the inconvenience of constantly bouncing between two different windows
 
I'm still curious, though. Since I think the whole idea that you can use code as your design requires you to have those capabilities. If you have a language that doesn't support that or use tools that let you have that functionality, then the whole idea just starts to blow up.
 
6:27 PM
for backend C++ code, it's all server-side stuff so I use the vim that's installed on all of our unix boxes
for our miscellaneous python scripts, I use Notepad++
 
In order for code to be design, it needs to be as easy for me to manipulate as a sketch on a whiteboard or a drawing in Visio.
 
@ThomasOwens I think that's true in the statically typed languages that require you to say the same thing in at least two places, like C++
it's less true in dynamically typed languages imo
 
@Ixrec Still true, though. I need to be able to move functions around to different classes or modules.
Or pull a group of methods into a new class.
Python is dynamically typed, and I would still want that kind of functionality.
 
in all seriousness, I've never been in a situation where I had (or at least knew I had) any sort of automagical refactoring options, even when using Visual C++ on personal stuff
 
@Ixrec Really?
 
6:32 PM
really
 
No wonder you don't buy into IDE's magic
 
I do Java at work and I've been poking around in Scala at home (Haskell was a bit too mindblowing, so I'm going multiparadigm first). I can pretty much click and drag my code everywhere.
 
The fact is that enterprise programming languages are very verbose, and less expressive than other more powerful languages. Every tool that is employed to improve that expressiveness and deal with the verbosity is a workaround, and there is a price that you pay for that verbosity, every time you have to read it again.
2
 
to be fair, C++ has poor tooling because it sucks
 
user114359
@RobertHarvey I do not believe there is a scale of "expressive <--> not expressive" I think it is a matter of what you want to express
 
6:33 PM
even Sublime I can't remember doing anything fancier than a global find/replace
 
Java's main claim to fame is that it is popular, because it's relatively easy to learn, so you can find a programmer on every street corner.
 
user114359
Do you want a fancy type system? Do you want to trivialize wiring up web pages and handlers? There are tradeoffs
 
I assume if I was doing Java, C# or client-side C++ there'd be more options for such magic
 
@RobertHarvey - and the price you pay for terseness is having to figure out what the hell it means again.
 
@Snowman, languages are a medium, some allow better "expressiveness", I think in the end you just want to express "this is the input, that is output"
 
6:34 PM
there's a difference between being terse and only saying something once
 
reading is always simpler (and less error prone) than mentally parsing terseness.
 
user114359
@ThomasOwens I read your post earlier about tooling in Vim, have you looked at refactoring plugins already, or just need a recommendation? I did not read the whole convo, nor have I looked into it myself.
 
@Snowman I don't use vim. I'm just curious if it's easily possible to give tools like vim and emacs the power of IDEs.
 
the other thing is it sounds like everyone with IDE magic got it by juggling a bunch of plugins, and tbh I don't really trust software that requires a half-dozen plugins to become useful
 
Mainly power in terms of refactoring.
 
6:36 PM
apps like that never seem to do what I want no matter how much I configure them (not to mention I'll always have to reconfigure them at some point); it's the apps that don't need customization that tend to be reliable and trustworthy
 
user114359
I honestly had to ask myself if the author of this question was drunk. I cleaned it up a bit, that is the original version.
 
user114359
@ThomasOwens the key to refactoring tools is you need to build an AST in memory. The first question, therefore, is "does this tool have a compiler built-in for language X?"
 
one of the biggest reasons Go excites me is because it has so much standard tooling, including ASTs and whatnot
 
@Snowman So I'm guessing that's non-trivial for text editors.
 
user114359
@André Too much information lost in the abstraction. Languages are a tool too, and some tools make some tasks easier, often at the expense of something else.
 
6:40 PM
with C++ you could spend weeks gathering up all the stuff that Go comes with by default
@ThomasOwens I think if the editor is parsing the language, it's kind of not just an editor anymore
 
user114359
@Ixrec in 2015 you have to consider C++ as "C++11 plus some toolkit such as wxWidgets or Qt."
 
pretty much
we don't use it for frontend stuff but we have our own fairly massive toolkit for the services we build with it
 
@Ixrec I'd agree with that. So I guess my question is: "Can you make vi(m) and emacs IDEs?"
 
user114359
@Ixrec Some editors do basic syntax coloring based on regex, which is technically parsing. But knowing "this is a token representing a variable of type X" is a lot more, and requires an AST (hence, a compiler, even if stripped down).
 
that's where my comment about juggling half a dozen plugins comes up
 
user114359
6:43 PM
Eclipse has its own built-in compiler in the JDT, and the editor leverages the AST as do the refactoring tools. I am sure VS is the same, but I can't view its source code to say for sure.
 
@Snowman yeah, I've set up things like that in Notepad++ before, but I think we're talking about the kind of auto-refactoring magic that I keep hearing fairy tales about but never see in the wild
 
@Ixrec you need to drink more absinthe to see the green fairy
 
refactor>rename is the best.
even simple "auto-format this file" is awesome.
 
inline rename is cool :P
 
@Ixrec I use this "auto-refactoring magic" every single day.
 
6:48 PM
we've toyed around with the idea of an auto-formatter, but I think only one person on the team is excited by it and the rest of us are afraid of all the holy syntax wars any attempt at introducing it would cause
 
@ThomasOwens Me too
 
for which languages/IDEs?
 
user114359
@Ixrec auto-formatting is huge. It actually gets rid of the format wars and makes SCM conflict resolution easier.
 
the thing is we don't have any format wars now
in fact, the only person on the team whose code I have any difficulty reading...is the guy who wanted to introduce the auto formatter
 
@Telastyn True, but for those individuals who are properly trained in the language, they have substantially less code to deal with.
That's why Java is so popular; the bar is lower.
 
6:50 PM
which is a benefit... why?
 
if I ever write Go code I'll definitely use gofmt from day one
 
user20683
@Telastyn Java culture is like World War 1. It's about throwing bodies at the problem by going over the top.
 
user114359
I know it is popular to hate on Java, but the real issue is crappy programmers, not crappy languages.
 
no, I understand why the bar is lower. I don't see how having substantially less code containing essentially the same information is meaningfully better.
 
user20683
@Snowman which is why I said Java "culture"
 
user20683
6:52 PM
Java itself isn't even close to terrible
 
at that point - because certainly uberverbose stuff is bad, but something like C# is not (imo) uberverbose. Even Java is not too far down the verbose side of things for me.
 
Java isn't terrible at all. But if you have programmers with better skillz, they're going to be more productive in a language that is more expressive.
 
what I've read about Java and C# implies I'd probably enjoy using them given a proper dev environment
 
As long as you're using Java 7 (or even more preferably Java 8), yeah.
 
You folks might be interested in this:
7
Q: Update On-Topic Help with Links to Common SE Sites

EBrownI was curious if there were a reason certain sites (very closely related to SO) were omitted from the on-topic page. I almost think (and this might go along with the migrations) that the current information lacks certain specific sites. Code Review for example. I seem to see a few (enough to no...

 
user114359
6:55 PM
@Ixrec you need an IDE to be productive in most languages, certainly any language in the C family.
 
it seems like "it's nice if you're using the latest version" is true of most mainstream languages these days
maybe all those standards committees are doing something right
@Snowman when I did a personal project in C++ I found that Visual Studio wasn't cross-platform enough, and every IDE that claimed to be cross-platform I could never get to work properly for some reason
after wasting a few weeks on them I ended up just using vim and gcc
 
user114359
@Ixrec Cross-platform C/C++ is rough. Even if you use a cross-platform toolkit, each platform has its own editors and its own way of structuring projects. You can make it work, but there are annoying little things.
 
@Snowman yeah, the cross-platform libraries seem to work fine, but not the "integrated tooling"
whenever I go back to it I think I'm going to learn CMake so that I can use Visual Studio on Windows and make/vim on Linux or something
 
@ThomasOwens Thoughts on this? github.com/mockito/mockito/issues/231
 
7:11 PM
@durron597 I don't fully understand the issue.
 
@ThomasOwens Did you read the stackoverflow question linked there?
 
But then again, I'm using Mockito 1.10.19 and JUnit 4.
 
@ThomasOwens JUnit 4 is not very meaningful for this discussion. 4.10 or 4.11?
 
4.11
 
@ThomasOwens Right, so read this
 
7:13 PM
I just looked. Eclipse comes with Junt 4.11.0 and Hamcrest 1.3.0. I dropped in Mockito 1.10.19, since that's that approved one at work
Oh. I'm using Mockito-All.
Which includes the version of Hamcrest that it needs. I think they stopped distributing -all, though.
Unless I'm just not getting it. I've got like 3 things going on right now, since I'm about to head out of work until Thursday.
 
57
Q: Why is Visual C++ lacking refactor functionality?

xyzWhen programming in C++ in Visual Studio 2008, why is there no functionality like that seen in the refactor menu when using C#? I use Rename constantly and you really miss it when it's not there. I'm sure you can get plugins that offer this, but why isn't it integrated in to the IDE when using C...

ah, it's not just me
 
anyone have a good dark windows theme they like? not because i'm emo, just because of eye strain. it doesn't have to be that dark.
 
I think I have seen similar questions to this before on Programmers, could this question belong on Programmers?
2
Q: Detect all indices of invalid zeroes in the input string (Modify algorithm that I have)

BehzadMy requirements are as follows: Input: one array of integer (value will be only 0/1) and an integer ζ Process: detect all indices of invalid zeroes An invalid zero is a zero that belongs to a run of 0s whose length is greater than or equal to ζ Output: ArrayList holding all indices of inv...

 
@ThomasOwens don't worry about it. it's not that important.
 
@SimonAndréForsberg seems like it could, though I'm having some difficulty understanding it
 
7:23 PM
yeah, that might be a problem of its own :)
 
ah I get it now
yeah there's a far more intuitive way to phrase that
definitely on-topic for PSE, probably not worth the effort to migrate, I think it's on-topic for SO too but I dunno that site as well
also, this is the second day in a row I get over 10 upvotes on a very half-assed answer I almost didn't write at all
 
Agreed. Thanks, at least now I know a little bit more about what's on-topic on your site about design or something squishy like that
 
@Ixrec soundbyte answers normally get more upvotes...
 
tbh whiteboard-style design questions are the minority here, despite that ostensibly being our main focus
I don't think I could give a concise statement of what's actually on-topic here even though I can identify/justify it easily for any given example question
 
@Ixrec I guess that's why we on Code Review often say that nobody knows what's on-topic on Programmers.
 
7:29 PM
I think the best attempt at a concise statement would be a list of programming-related topics we accept because they can be made into answerable/good subjective questions
probably something like algorithms, licensing, maintainability, architecture
though each of those categories requires a couple sentences explaining where the cutoff for "answerable" lies, as we've had to learn that from experience
 
Our scope is Software Engineering.
Well, mostly. Except for code problems.
 
we also can't claim "language agnostic questions" is useful even as a litmus test, since a lot of our best questions are about design/architecture/coding style within a single language, and requires people familiar with that particular language to properly answer
 
Head's up. Open Source has reached 100% commitment. Law is also in beta.
 
Law made beta!?
 
How long before we call licensing off-topic and shift it to Open Source and Law?
 
7:33 PM
it could be never, a lot of licensing issues have never been tested in court and most legal systems are very outdated when it comes to software issues in general, so I'm not sure what the people on a "Law" site would do with such questions
would be worth "seeding" them to find out though
 
Maybe once they get mods, I can ask them.
I wouldn't do anything before the site has moderators and is at least 3 months old.
 
of course
 
I wonder if Programmers is at risk of obsoleting itself.
 
honestly, every group of blatantly overlapping SE sites carries a little risk of that
the programming ones are by far the worst though
 
user55340
@ThomasOwens As long as people ask about design and architecture we're fine. We seem to have a fairly good stream of those questions.
 
user55340
7:39 PM
There are also some licensing questions that are things that draw upon the expert knowledge of programmers rather than lawyers.
 
user55340
Granted, the tough ones (for us) are the lawyer questions.
 
Let's go down the list. Software requirements? Safe, for now. Software architecture and design? I could make many architectural and design questions OK for SO. Algorithm and data structures? Computer Science, or SO for implementation. QA and testing? There's an SQA site. Development methodologies and processes? Safe. Software CM? Safe. Software engineering management? Safe, but some overlap with Engineering and Project Management. Software licensing? Open Source and Law in the near future, probs
 
there are also some "technical" questions that SO tends to answer with paragraphs of standardese, but we would answer with a conceptual argument about why the standard had to be that way; both answers are useful
 
I think you will get more luck with this question if you asked on Programmers Stack ExchangeJason Evans 41 secs ago
 
user55340
CS would need to change their culture to be less "funny greek characters"
 
7:40 PM
@MichaelT Which is why it would get split between CS and SO.
 
user55340
I like to look at us in the pragmatic middle ground between CS and SO.
 
yeah, I have a hard time seeing any practical algorithms questions go to CS
@ThomasOwens what do you mean by "software requirements"?
 
user55340
SO doesn't have the culture of good answers though. When people ask "why is the string immutable" thats not something that SO is prepared to give a good answer for.
 
@Ixrec Requirements development and management. User stories, specifications, use cases.
 
ah right, I'd lump that under project management
 
7:42 PM
@Ixrec Project management is different. It's cost estimation, time estimation, scheduling, budgeting, resource allocation.
 
user55340
Consider this that got asked today... and where would you ask it (if not here)?
 
user55340
11
Q: Why do programs use call stacks?

moonman239Why not have the compiler take a program like this: function a(b) { return b^2 }; function c(b) { return a(b) + 5 }; and convert it into a program like this: function c(b) { return b^2 + 5 }; thereby eliminating the computer's need to remember c(b)'s return address? I suppose the increased...

 
user114359
@MichaelT I agree. Implementation = SO, design = here, theory = CS
 
polishing a working implementation = CR
 
user114359
polishing a turd = experts exchange
 
user55340
7:45 PM
(scrolling over CS.SE for the type of questions... spotted a familiar gravatar)
 
user55340
0
Q: Does XML covers the representation of any structured data and knowledge

AhmadI see nowadays XML is used to structure any file or data. It can represent the flat and hierarchical relations. It even can be used to show the parse tree of a sentence in a natural language. I am not familiar with the orders of logic and knowledge, but I would like to know is theoretically XML ...

 
interesting, that'd clearly be too broad here, I wonder what they think of it
 
user114359
@Ixrec off-topic
 
user55340
Consider this comment and feel confident that P.SE won't be obsolete:
 
user55340
@babou The original question was about C (as evidenced by its tags), so it was off-topic. Since the use of the tag c turns out to have been a mistake, and the question is actually about language design in general, the question is on-topic. There is no parochialism involved here. — Gilles ♦ 11 mins ago
 
user114359
7:47 PM
If he had discussed the math behind XML as a language and its expressiveness then maybe
 
for us the bigger issue is probably finding a way to reduce the ratio of on-topic yet badly asked questions
it seems like most people with a design question can either solve it themselves or are so totally lost they don't even know what "prior research" to attempt before asking
 
user55340
Read the linked question, @Alexei. Then, if you still have concerns, lay them out in a new question with less hyperbole. Many topics can be constructive, but it takes a skilled hand to prevent them from going off the rails; a significant portion of the expertise here is devoted to developing such skill and guiding askers away from the cliffs. — Shog9 ♦ Apr 21 at 18:34
 
Design is hard.
 
at least in my experience at work, every time I have a non-trivial design question my first instinct is to gather more information about upcoming features/requirements or other people's refactoring work, and that always turns up a pretty clear tiebreaker for me
 
user55340
I should point out, there was that vote / view / size chart for awhile back and the sites we were closest to were Math Overflow and Skeptics. I would also point out our own difficulty in asking Skeptics questions that are within their scope / definition. I suspect others have similar problems with us.
 
7:53 PM
Q&A is hard
 
user55340
Lets go shopping!
 
I thought of that the moment I typed it
well, in theory we're all here because we like it this way
whatever this way is
 
enh. There's no great alternative for actual discussion.
 
8:10 PM
random thought
you know how they recently added the ability for OP to dupe-hammer themselves?
I wonder if a self-migrate-hammer would make any sense (if done in a way that might prevent cross-posting)
 
I'll take that as "it makes enough sense at first glance to be worth posting"
 
@ThomasOwens Our design update is up to almost 3 weeks
@Ixrec How else would you take it?
So I finally took the time to change windows and eclipse to a decent dark theme
the problem is, everything else is super bright so if i have anything open that isn't windows or eclipse (like this chatroom) it makes it impossible to see
 
I have the same problem at work, our product (which we dogfood heavily) has a very dark theme, but emails with lots of HTML in them tend to produce a giant white rectangle in the middle of all those dark colors
 
does anyone have any experience with hacker vision? chrome.google.com/webstore/detail/hacker-vision/…
hm. not bad
the text is a little blurry though
 
psr
9:26 PM
@ThomasOwens Algorithm and data structures get answered on Computer Science, but not always in a way helpful to software developers. They should be on topic here too.
 
9:51 PM
Welcome to StackOverflow JReinhal. StackOverflow is designed "for professional and enthusiast programmers". So this is not the right place to ask for help if you haven't already a minimal coding practice. While this may sound elitist, this guarantees the high quality of its content. We'll be happy to answer your future programmation questions once you've got the through the basics though! — Guillaume Algis 13 secs ago
 
00:00 - 18:0018:00 - 22:00

« first day (1743 days earlier)      last day (3239 days later) »