« first day (924 days earlier)      last day (3521 days later) » 

3:13 AM
@Raphael. This in particular, is a comment template that I'd like to see changed. Yes, I agree that posting an image is not a good idea for several reasons, but we could point that out without using "lazy". In what way does that help the (often new) poster? It's similar in potential irritation to the "This is a homework dump" comment, which is at the very least open to misinterpretation
 
 
3 hours later…
5:56 AM
This post is hanging in reopen limbo for almost a day and the OP is (understandably) confused, if they should make more changes. It would be nice, if more people could review.
0
Q: Algorithm for finding best combination of elements

ginsunuvaSay I have a very large, arbitrary number of variables, each of which can be type A, B, or C. The types come with expenses: Type A's are the least expensive, and C's are the most expensive, but their expense varies from variable to variable. For example {A, C, C} may actually give better results...

And FTR: I'm also in favor of rewording that canned comment.
 
 
3 hours later…
9:24 AM
@RickDecker Do you mean just dropping the "lazy" part or reformulating more? Please make a proposal we can discuss and adopt! (cc @FrankW)
Stack Overflow et al now have executable code in posts:
David Haney on September 16, 2014

On Stack Overflow and our other code-related sites, creating a minimal, complete, and verifiable example is the best way to get an answer to your question. We’ve always loved JSFiddle and sites like it because they let both askers and answerers reference runnable, working code that demonstrates their problem or solution.

Unfortunately, the use of these external sites introduces a few problems:

If the link breaks, the post becomes worthless.

If the code isn’t embedded in the page, visitors are forced to go elsewhere to get the full content of the question or answer. …

Do you think we could/should have something similar on Computer Science?
I feel like executable pseudo code (which? how?) would be nice in some cases, but it might also move the focus away from sciencey answer to fiddly answers.
@FrankW A quick read does not leave me with a very clear picture of what the question is. Is it clear to you, as in could you write an answer?
@RickDecker Same goes for other templates you dislike. Some of them are very blunt -- which I for one consider best in many cases -- and milder (yet still clear) phrasings may be advantageous if new users are needlessly offended. (I don't think it's always needless, sadly.)
 
9:40 AM
@Raphael I feel it's borderline at the moment. If it were closer to my area of expertise I might be able to answer.
If someone can ask the right questions of the OP, that help them further clarify, that would be a win as well in my book. (So far the person has reacted to suggestions in a very constructive way.)
 
@FrankW That doesn't help me deciding whether clicking "reopen" now would be a good thing. :)
I can't tell if the problem is standard if put in terms coming from an application, or if it's something wicked.
 
10:08 AM
I think I managed to make the question more clear.
 
@FrankW I still can't tell what the actual cost and target functions are.
 
The goal is to get the expense as close to the threshold as possible (from above). This is stated in the third and fourth paragraph.
 
If I understand correctly, though, the per-item cost depends on both item and type. We don't get any information on that relationship.
 
Yes. The only way to get information on that relationship is by making an assignment and evaluating it.
 
Which leaves no solution but brute-force or random picks.
 
10:16 AM
(Which makes the original idea of looking in the area of genetic algorithms reasonable)
 
Okay, that may be a valid answer (if boring)
@FrankW Only if their is some structure.
 
It might be acceptable to identify the type-cost relationship for each item seperately and then optimize
 
@FrankW True.
If the relationship is context-free, that would be reasonable.
 
 
1 hour later…
11:33 AM
@Raphael "Executable pseudo code" may not be an oxymoron, but it's still funny
@Raphael I thought about proposing the current thing on meta, but for a very obscure reason.
It actually makes it possible to use svg on SE.
1
A: Stack Snippets Sandbox: Try It Out Here!

Wandering Logic <h1>SCORE!</h1> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.source...

And 99/100 times when we post a picture here it is a (sadly) a bitmap rendering of something we originally drew in a vector-drawing program.
The closest to "executable pseudo code" we are likely to ever get is Python.
 
@WanderingLogic Yay!
@WanderingLogic Yea, but having the code first and the image a click away is not better. Imho, they should just pressure Imgur to allowing SVG or switch the default hoster.
(Afaik, SE itself does not prevent SVG?)
@WanderingLogic Bah... whitespace with semantics can never be Pseudocode. ;)
@WanderingLogic This makes me wonder: should we ever feel save clicking that button?
 
11:49 AM
@Raphael Maybe Ruby?
@Raphael imgur doesn't support svg
 
@WanderingLogic Exactly.
 
You can, I think, put in an img pointing off-site, but then you don't get the same "archival" features as other imgs or text.
 
@WanderingLogic Hm, I like Ruby but I wouldn't pick it for pseudo code. The ass-array API is a little bit too contrived for that.
 
Inline svg doesn't get recognized as "simple valid html"
 
15
Q: Allow SVG image uploads

bgoodrI am unable to upload SVG image files to Stack Overflow. So I would like to know why it is blocked while other image formats are allowed. SVG images are useful for diagrams such as tree diagrams for algorithm discussions.

 
11:53 AM
@Raphael I am trying to choose from languages in the top 20 or 30 in popularity. SE is unlikely to be willing to consider anything that doesn't have a significant tag presence on SO
 
Also, I think we would want to request a "stripped-down" version.
 
@WanderingLogic Since we may be pretty much the only site interested in pseudo code (?) I think we can ask for whatever we want, and then implement it ourselves via userscript. (duh)
 
@Raphael What's userscript?
 
Greasemonkey is a Mozilla Firefox extension that allows users to install scripts that make on-the-fly changes to web page content after or before the page is loaded in the browser (also known as augmented browsing). The changes made to the web pages are executed every time the page is viewed, making them effectively permanent for the user running the script. Greasemonkey can be used for customizing page appearance, adding new functions to web pages (for example, embedding price comparisons within shopping sites), fixing rendering bugs, combining data from multiple web pages, and numerous other...
Seems you have been missing out!
There are a couple of good ones for SE (which made me install Greasemonkey in the first place).
These are two I can definitely recommend:
27
Q: Stack Overflow Unofficial Patch

Ilmari Karonen The Stack Overflow Unofficial Patch (SOUP) is a project to collect various minor client-side bugfixes, work-arounds and usability improvements for Stack Overflow and other Q&A sites on the Stack Exchange Network into a single user script. The intent of SOUP is not to make any substantial ...

45
Q: SE Chat Modifications -- Keyboard navigation and commands for chat

Tim Stone Screenshot Use /command shortcuts to perform common chat tasks: See message history inline: Easily preview replied-to messages: And much, much more... About Legends tell of a prolific Meta Stack Overflow chatter who despised using their mouse above all things. In an effort to keep t...

User style (e.g. with Stylish) are also useful.
 
12:00 PM
@Raphael Meh. Too much configuration work.
 
I use it to keep my the topbar with me: meta.stackexchange.com/a/142217/156248
@WanderingLogic Not at all. It's like five clicks. (With FF, that is.) Install the browser addon, install the user script, done.
 
@Raphael Until about a week ago I used Chrome most of the time.
Which I guess has Tampermonkey
but I've never tried it.
 
@WanderingLogic Can't say anything about Chrome, never used it.
 
I actually switched to FF last week because I've been having trouble getting logged in to chat from Chrome.
(this chat)
and watching y'all talk without interjecting my witty comments is not as much fun.
 
@WanderingLogic Hear hear. :D
Login to chat is a hassle. You suddenly need to allow more scripts in the middle of the process. I'm glad the auto-logout hits so rarely...
 
12:07 PM
@Raphael I've actually never thought very much about the SE login procedure. It's very weirdly asynchronous.
It's also stupid and annoying that there is a seperate login for every sub-site of stackexchange.com
(I can maybe understand the need for different logins at su.com, so.com and sf.com.)
 
@WanderingLogic I think login on the network works differently from chat; there's a weird split between the systems. I remember a discussion in the mod chat about that. Apparently -- iirc -- chat started out as a whipped-up side project and never actually got to mature behind the UI.
 
@Raphael Ah.
 
@WanderingLogic They connect easily so that does not bother me (I use SE's OpenID). The only account that's really distinct is the chat account.
 
12:26 PM
@Raphael a = Hash.new; a["Peter"] = 32? meta.stackexchange.com/a/239467/218898 (I'm not very familiar with Ruby).
 
@WanderingLogic a = {} even.
One thing is that you get an array by a = [] and a hash by a = {} -- that's annoying.
But my issue is more with weird name choices for operations on arrays. In general, the whole convention about names with ? and ! is nice, but nothing I want to see in pseudo code.
I guess I'd go with a Java subset. Many CS curricula teach Java and/or C anyway, and it's mostly readable (if verbose). (IIRC there are even interactive interpreters for some such subsets)
I love Scala but I'm not sure how well it would serve for pseudo code.
 
12:51 PM
@Raphael It certainly solves the problem of associative arrays. (They're not in the language, but a library API.)
But surely you don't want a statically typed language with no type inference?
(at least for local vars?)
In which case you are coming dangerously close to (puke, rolf, hurl, ...) Go.
Huh. I can't figure out how to spell "rolf". I thought it was one of the many synonyms for "vomit" that they used on Wayne's World, but I can't find any reference to it.
Ah. Ralf, not rolf.
 
1:11 PM
@WanderingLogic I'm not sure. For teaching precision and "think before you type" (which I am all for), static typing can be useful. For rapid code production it's a hindrance. So either can make sense, depending on your priorities.
Again, I like the Scala approach: it's statically typed but has inference. So you can just write a = 5 but also a = 5 : Int. IIRC, you have to give types for method parameters and return types most of the time, which is nice in the "think before you type" paradigm. (You don't do that too often.)
It also has all the goodies of algebraic datatypes, options, higher-order functions and the like. <3
 
@Raphael Yes, but we're talking about "pseudo code" not a language for teaching programming. I can't think of an algorithms book where local variable types aren't implicitly inferred.
And Go is the only language I know with (a) C-derived syntax and (b) type inference for local vars.
(Unless you want to count C++'s auto, but I'm pretty sure you don't want to go there.)
 
@WanderingLogic True, but especially in a theory course I'd like to make a point of precision. And I despise "mathematicians-style" pseudocode. That said, no, you won't bother with types most of the time, maybe because you use so few.
@WanderingLogic Ah, that "Go" of yours meant that Go. Have to check...
Lots of people like Lua as a scripting language.
Go or Go! ? (d'oh)
 
@WanderingLogic It looks intuitive enough. May be a good candidate indeed!
 
@Raphael Ick. Yuck. Please no.
The programming language folks will throw a fit too.
 
1:23 PM
I wonder if "What are good approaches to have executable pseudo code?" would be a good question for the site. I know the issue has bothered me, thinking about what to do should I ever have to prepare lecture notes or a book.
@WanderingLogic Which one, now?
(With Ctrl + Up you can move to the message to reply to; select it with Right. Do the same with one of your messages to edit.
@WanderingLogic What do they care about the pseudocode I use to teach algorithms?
 
Go. The language developed by Rob Pike and Ken Thompson (of Bell Labs, Unix/Plan 9 fame) and Robert Griesemer, all currently employees of Google.
The programming language folks don't care about what you use in your course
 
Now that I think about it, having native support for something ADT-like would come in very handy indeed. Defining "types" for, say, trees is so bothersome in Java et al.
@WanderingLogic I thought you were proposing it?
 
But they might care about the history of the language that we use for pseudo code on this site.
 
@WanderingLogic Ah, fair enough. :D
For that purpose, we might have to consider the requirement "easy to interpret using JS" since that's probably what would have to happen.
 
@Raphael No. I was responding to your proposal of "Java". With "the closest thing to Java with inferred types for local variables is Go."
 
1:28 PM
@WanderingLogic I misunderstood then. For me, that statement is a proposal. ;)
 
Go has the benefit that it is an increasingly popular systems programming language, and has a number of features designed to make it "easy to use" but...
 
Actually, why restrict yourself to one language? (In teaching or on SE) After all, we want to teach how to pick the best tool for the job. So I might want to implement QS "basic" in functional style, the one with faster partitioning in procedural style then, and graph algorithms in OO style.
@WanderingLogic but ...? (I'm mostly unaware of PL crusades.)
 
... I've seen several forums where they wax poetic about all the new language features they have "invented" and the folks with some programming language background come along in the replies and say, "you woulda known about that if you had studied some historical languages like Eiffel".
That is, the designers are a bunch of systems hackers who are making it up on the fly. Whether they are "getting it right" or not is a matter of question, but they are doing it in a way that neither recognizes, nor appreciates, the years of research and experience that came before them.
That is: they are offensive to anyone with a sense of history and research.
John Ousterhout was similarly offensive with Tcl.
 
Ah, but how can ignorance/stupidity be offensive?
 
The "you programming language guys don't know what you are doing. Here's what a useful progrmaming language looks like."
 
1:35 PM
Even if they reinvent the wheel, they may do a good job. Smugness aside.
@WanderingLogic I see. Sounds like "what I don't like about practitioners" in one line. ;)
 
@Raphael Yes. many of us.
 
We gotta let that go. Stomach ulcers lie that way.
(Also one thing I like about Scala: the creators are PL guys and their design and semantics actually make sense.)
(I'm a little fanboy-ish, aren't I?)
 
@Raphael Yes, Scala or Haskell (or anything else in the historical ML line) would probably be easier for the PL folks to stomach.
Scala is a bit too "kitchen sink"ish for my taste.
 
What do you mean by that?
 
@Raphael Getting back to, "What are good approaches to have executable pseudo code?" aren't you worried that the site mods would close it as too subjective? :-D
 
1:51 PM
@WanderingLogic You'd need to make a good-subjective question of it, that is give relatively objective criteria. E.g. little boiler-plate, free interpreter available, supports mutliple programming paradigms, close to Java/C in syntax, not designed by douches...
"yields nice pseudocode" is certainly a very subjective criterion.
 
@Raphael regarding Scala, it's a personal taste thing. I like languages as simple as possible. I'd use Scheme all the time if I could get away with it. C has a tiny spec compared to most languages. Compare to the first two paragraphs of the Scala Wikipedia page.
 
I think we do have at least one question that asks something similar for the purpose of teaching programming (theory).
22
Q: Criteria for selecting language for first programming course

Dave ClarkeAs a university-level CS educator, the issue of which programming language to teach in the first programming course often comes up for discussion. There are thousands of languages to choose between, and lots of religious fever (or fevour) supporting one language camp over another. All of this sub...

6
Q: Language for teaching basic programming

Ari TrachtenbergI'm interesting in teaching programming to middle school students. I'd like a programming language with the following criteria: Simple - pared down to the absolute minimum needed to support sophisticated programming without too much code. As such, for this language, I'm not interested in poin...

I seem to remember that Robert Sedgewick actually uses Java in his Algorithms book.
Seems only fair if you expect your students to upload their hand-ins in executable Java (for automated testing/grading).
 
Sorry. Gotta go for a couple hours.
 
@WanderingLogic Have fun/Good luck!
@WanderingLogic Actually, if I were to post that question, I'd give one or two well-chosen examples that I'd expect an answer to translate to their proposed language. One could even tie some measurable criteria to this: number of lines/characters, delta to "textbook pseudocode", amount of boilerplate, etc. (Assuming a readable style.)
 
2:44 PM
Wow. If we ever need an example for "Why should I post algorithms questions on Computer Science instead of Mathematics/MathOverflow?"
3
Q: How to find central vertex in a graph?

MathsniperI am learning graph theory and some concept that I cannot figure it out. A vertex is central in $G$ if its greatest distance from any other vertex is as small as possible. Is there any algorithm to find central vertex in any given graph $G$? Thanks.

 

« first day (924 days earlier)      last day (3521 days later) »