Questions tagged [code-golf]

For questions about code golf challenges and/or submissions. DO NOT post code golf challenges themselves as questions here; those belong on the main site or in the Sandbox if you want to get feedback on them.

Filter by
Sorted by
Tagged with
13
votes
3answers
672 views

JavaScript Standards for IO

When it comes to JavaScript code-golf, there tends to be two schools of thought regarding IO (specifically printing). Some golfers will use functions such as alert,...
0
votes
2answers
183 views

What to do if there're two answers with the shortest code?

On my Code Golf "Converting a string to lower-case (without built-in to-lower functions!)", there're two answers with the same character count (10 characters), and they're both the answer with the ...
17
votes
4answers
750 views

How to Make Code Golf More Enjoyable: Winners by Language?

So, I was reading the related question here, when I went off on a tangent. The point of the given post, as I read it, is that certain languages like GolfScript, K, and some other extremely-high level ...
0
votes
1answer
168 views

Is the Chrome UserScript still recommended?

If I recall correctly, the chrome user script used to be recommended in the About/FAQ pages somewhere, but I can't find it anymore. I know that UserScripts must be installed from the Chrome Web Store ...
9
votes
6answers
863 views

Fair size comparison across languages with different source alphabets

For fair comparison of codegolf solutions in languages with different source alphabets, there should be a common unit of information. Most sizes here are expressed in "characters" or "bytes", but not ...
5
votes
1answer
194 views

Voting in "We're no strangers to code golf"

Congratulations to Polynomial for the most visited codegolf.SE question ever! I think it would be interesting to take a look at how the votes went there. We want votes and answer quality to match, so ...
0
votes
1answer
254 views

what is difference between code golfer and code fu? [closed]

I am working around to stick with this site bit i am not able to understand what question should ask here and what exactly code golfers and code fu means and main difference I know this very silly and ...
1
vote
2answers
160 views

Making minimal modifications to fix code

This is bugging the hell out of me. I could have sworn I had seen the challenge here: http://golf.shinh.org/all.rb a while back, but I've just gone through all 500 of those challenges and none of them ...
15
votes
5answers
510 views

Remove number of characters from answers, if it's not a CG-question

I like to encourage people, to remove the number of characters from answers, given for questions, which are not code golf. Example: Here is a recent question which isn't a codegolf, which has 8 ...
3
votes
2answers
242 views

Is using external decompression legitimate golfing?

The 12 Days of Christmas Lyrics challenge has several solutions of the form "Use an external decompression utility on this file to create a solution.language file, then execute the decompressed file." ...
11
votes
6answers
822 views

Is a code golfing library legitimate? [duplicate]

My read on the current state of meta.CG opinion is that the use of libraries is acceptable and that the library call should count in the character count: Use of built-in functions and libraries in ...
5
votes
1answer
363 views

should imports/includes count in golf [duplicate]

follow the title mainly I'm asking this so I know whether to count all the import declarations that are required for the code to run successfully (especially when the import/include is required in ...
3
votes
1answer
176 views

Some clarification on JavaScript code golf solutions

I always try to use JavaScript when posting a code golf solution, but there are a few things I'm wondering: It is said that global variables are allowed. However, what if the code can therefore only ...
5
votes
4answers
377 views

Define new languages?

Can I define some new languages, to be used in future code golfs? For example, CG-VB.NET would be a language which is equivalent to itself as VB.NET code, but wrapped in: ...
1
vote
2answers
234 views

Counting Newlines [duplicate]

Possible Duplicate: Line break formats and character numbers Do we count newlines in code-golf? I know newlines are almost redundant in code-golf, but imagine it's a language requirement. How ...
152
votes
17answers
9k views

J and GolfScript suck all the enjoyment out of Code Golf

I have found code-golf a fascinating pastime for several weeks now. However, I’m already losing interest because the contests allow any language, and because of that it is pretty much impossible for ...
9
votes
3answers
346 views

Can code-golf answers be too slow?

This answer is a fairly extreme example. For the largest input it would create an array with 1.048576e+26 elements which is not going to fit in RAM anytime soon (maybe not even physically possible). ...
12
votes
4answers
2k views

Language Handicap [duplicate]

This question is because my favorite language C++ does not lend itself to code golf. Now I could try and pick up a new scripting language (like golf-script) or brush up on an old favorite (perl), but ...
12
votes
4answers
432 views

Presolving Golf Questions

I notice some users are posting questions where they are immediately posting a long-standing (or just extremely well golfed) solution to the problem. On StackOverflow posting your own questions has ...
23
votes
3answers
929 views

What details should always be given for a code golf task?

Related: For Code Golf, how do you deal with languages without a traditional print/echo statements? Related: What programming language should we consider for the code-golf solution ? Related: Use of ...
8
votes
3answers
314 views

Tab characters in code golf answers

This answer made me realise we should standardise on how to distinguish literal tabs in code from space characters. This becomes crucial in optimising the length of Python code, where 1xtab and ...
5
votes
2answers
386 views

For Code Golf, how do you deal with languages without a traditional print/echo statements? [duplicate]

JavaScript comes to mind as a language without a traditional outputting mechanism. In this instance, document.write() is suggested, but its specific to the browser,...
5
votes
3answers
211 views

Should golf questions be a CW and why?

I thought CW was for making only 1 answer per language, but on SO I saw again and again, that question had two or more answers of the same language. Should we keep CW-checkbox tradition? If it needs ...
2
votes
2answers
356 views

Code golf answers that aren't golfing attempts

This answer clearly wasn't golfed, but is still a valid solution to the problem. How should we handle such answers? Should we down-vote them for being long? Should a mod delete them for being off-...
11
votes
5answers
787 views

Use of built-in functions and libraries in Code Golfs

This answer used a built-in Python function to solve the question in a very short amount of code. Should we allow it and let people not up-vote, or should we police library abuse to some degree? If ...
3
votes
1answer
336 views

C/C++ golfing: Should undefined behaviour be allowed? [duplicate]

This question on SO raised some comments about using undefined behaviour in C/C++ golfing. Should we require that solutions follow the standard? If we do, we could promote down-voting of solutions ...
5
votes
10answers
268 views

Methods of counting characters on various systems

Counting characters of a program manually is tedious, and we do this a lot in Code Golf. How do you do a more effective character count using utilities provided by your shell or ide?
3
votes
2answers
305 views

What input methods should we allow for Code Golfs? [duplicate]

Should we define rules on how input can be fed into programs? This question on SO allowed for any input method, which resulted in answers which ripped off the question by doing the computation in ...

1 2 3 4
5