News [RSS Feed]

Guns And Zips

Posted 19.08.2009 by carldr.

To celebrate 1 year of no new challenges, here's a nicely difficult one for you - Visit it at Guns And Zips.

Saving Time

Posted 19.08.2008 by carldr.

It's not quite a record given it's been only 217 days since Choose was added to the site, but we have a new challenge for you.

The challenge involves representing a time given in digital format (ie, hh:mm) on an analogue-style clock face. As usual, the challenge description gives you all the information you require - Visit it at Saving Time.

Thanks go to Arpad Ray for sending in this challenge.

Choose

Posted 15.01.2008 by carldr.

We had planned to release this challenge a little earlier than this, but with the holidays and all, it got a little delayed.

The challenge asks you to calculate how many different ways you can pick a certain number of items from a larger set of those items. Don’t be scared off if you don’t know how to do this, all the information you need is in the challenge description. Visit the Choose challenge page.

Thanks go to Flagitious for sending in this challenge.

Something that might be of interest to you Code Golfers – Flagitious recently created a language called GolfScript. which was designed specifically to be good for golfing. Please visit the site and have a look.

To give you an idea of how good it is, this challenge can be solved in 21 bytes in GolfScript, which he estimates being half the size of what the winning submission on Code Golf will be!

Grid Computing

Posted 06.12.2007 by carldr.

Wow, it only seems like 236 yesterdays ago when we added the Tower of Hanoi challenge!

But here you are – Something new to play with. It’s a nice and simple one, involving finding the row or column in a grid of numbers which has the highest aggregate total. Read all about it on the Grid Computing challenge page, where you’ll see all the information you need.

Thanks to Ciaran Walsh for submitting the challenge.

So, how long until the next challenge you might ask? Who knows, but I’m pretty sure it’s going to land in less than 237 days.

Tower of Hanoi

Posted 13.04.2007 by carldr.

To celebrate the first Friday the 13th of 2007, we have a new challenge for you kerrrazy golfers. I’m sure most of you have heard of the Tower of Hanoi. This challenge requires you to take a starting position of the puzzle and organise the pegs onto one peg. Read all about it on the Tower of Hanoi challenge page, where you’ll see all the information you need.

I’m going to make the bold promise that we’ll have a new challenge next Friday, but I’ve said that before so we’ll see if it actually happens!

Musical Score

Posted 08.03.2007 by carldr.

It’s been more than a month since the last challenge, many apologies for the delay in posting a new challenge. So let’s hope you like it!

Musical Score asks you to parse a music score and output the notes which are represented on it. In my opinion, it’s quite an interesting problem. As usual, visit the challenge’s page to see the full details.

We’re hoping it won’t be anywhere near as long until the next challenge, and there have been a few interesting challenges posted on the forums. If you have any suggestions, you can post them there, or email me them at the address at the bottom of each Code Golf page.

Scheduled Downtime

Posted 12.02.2007 by carldr.

A quick note to let you all know that there will be roughly 30 minutes downtime from about 16:30 GMT tomorrow (Tuesday) afternoon for some essential server upgrades. During that period the Code Golf server will be completely unavailable.

Roman to Decimal

Posted 04.02.2007 by carldr.

A new challenge has arrived in the shape of ‘Roman to Decimal’. The problem is exactly as it sounds – Your code will be given some Roman numerals, and it will have to convert them to the system we’re all more familiar with.

There are 25 test cases, so hopefully there won’t be any luck-based submissions for this challenge!

Thanks must go to Flagitious for putting this challenge together, as well as writing the description. Good work man!

ASCII Art

Posted 12.01.2007 by carldr.

For those people who thought that Polynomial Division was too difficult, we have a nice and easy one for you this week. Given co-ordinates and the ASCII values of characters, you have to produce the piece of art that they describe. All the details are available on the Bob Ross’ The Joy of ASCII Art challenge page.

Code Golf user and resident #codegolf comedian Ciaran submitted this one, thanks Ciaran!

Polynomial Division

Posted 07.01.2007 by carldr.

I know, I know, I slacked off over Christmas and New Year but FINALLY I’ve sorted out a new challenge for you to play with.

Polynomial Division was suggested and submitted by Flagitious, who’s currently our #1 golfer and hangs out in the #codegolf IRC channel. Thanks Flagitious!

The idea is that you take two polynomials and divide them. The actual division process isn’t too complicated, but actually coding it isn’t what I’d call trivial. As usual, the challenge page contains much more information. I’m sure you’ll all have fun with it!

I have two or three other challenges that have been submitted recently, I might release one of the simpler ones later this week depending on how the submissions for the above challenge go. Either way, we shouldn’t have to wait weeks until the next challenge!

Zlib entries removed

Posted 28.12.2006 by carldr.

As previously mentioned, Python and PHP used to have access to a zlib module which made it trivial to compress programs written in those languages. In addition to this, Python has zip and bz2 codecs which also allowed trivial compression.

The Python and PHP entries which used these modules have now been marked as failed, and the various leaderboards now reflect the updated scores.

If you have previously submitted an entry which used these modules and it is still marked as passed, please let us know. Either email us or post in the forums and we’ll sort it out for you.

Thanks for everyone’s understanding, especially Mark Byers, who was 4th and has now dropped out of the top 10. Sorry Mark!

Delays, Delays, Delays

Posted 27.12.2006 by carldr.

I trust you’re all enjoying the holidays and catching up with friends and family you’ve not seen for a while – I know I certainly am! Because of this, we’re a few days late with the new challenge, but don’t fret, it is coming. It should be up by the end of the week.

In the meantime, if you’re itching for a some new golfing action, there is a contest going on over at Fonality as part of a recruitment drive they are having at the moment. The best thing is that they are offering cold, hard cash (up to US$350) and other prizes for the best solutions so you might get some return on spending your time on it.

The challenge is performing arithmetic with Roman numerals. It’s perl-only, and is played with the traditional Perl golf rules. For more details, visit their Perl Golf Challenge Page. There are already a few Code Golfers in the prize positions, let’s see if we can get some more in there!

(Btw, I’m not in any way associated with Fonality or their recruitment.)

Reverse

Posted 07.12.2006 by carldr.

A bit late (again) but the new challenge has finally arrived. Hope you all like it! It’s a little different from previous challenges in that there can be more than one valid output that your code can produce – The aim is still to come up with the shortest solution though!

As described in the seventies book BASIC Computer Games, “the game of Reverse requires you to arrange a list of numbers in numerical order from left to right. To move, you tell the computer how many numbers (counting from the left) to reverse. For example, if the current list is 2 3 4 5 1 6 7 8 9 and you reverse 4, the result will be 5 4 3 2 1 6 7 8 9. Now if you reverse 5, you win.”

For more information, visit the challenge page.

Thanks to Paul Bissex who suggested this challenge.

We’ve got a tricky challenge lined up for next time, I’m sure you’ll all love it!

Zlib modules pulled

Posted 06.12.2006 by carldr.

Due to the very low overhead required to use the zlib module, it has been removed from both PHP and Python (Which were the only two languages which had it available.)

This followed a discussion in the IRC channel where the prevailing view was that it was an unfair advantage to those languages, and detracted from the fun of golfing.

To keep the current challenges fair, we’re working on removing entries which have used this module, although this might take some time.

Thanks for your understanding.

Seven-Segment Displays

Posted 24.11.2006 by carldr.

The latest challenge to be added to Code Golf has just gone live. The idea is to take a number on stdin and represent it by mimicking a series of seven-segments. It’s a nice and easy problem, but as always, the challenge is doing it in as few bytes as possible! See the challenge page for more details.

It’s been nearly two weeks since the first Code Golf meetup, and it turns out I’ve forgotten to mention it! Due to illness, the turnout wasn’t as high as we’d have hoped, but fun and copious amounts of beer was had by all. One of the attendants had a slight accident on the way home. Hope you feel better marmaladea.

That’s all for now, I’m afraid. But changes are afoot!

PHP Upgraded

Posted 20.11.2006 by carldr.

PHP has been upgraded to 5.2.0 on the Code Golf server. If you’re interested in seeing what’s new or changed, read the PHP 5.2.0 Release Notes.

Dancing Queens

Posted 10.11.2006 by carldr.

It’s a bit late, but finally, here is a new challenge – Dancing Queens involves you having to work out how many moves are possible given a chessboard. We’ve made it fairly simple in that there will be only queens on the board, but there could be up to 11 of them! For more details, see the Dancing Queens challenge page.

Many thanks to Mark Byers for suggesting and submitting this challenge!

On a different note, the first Code Golf meetup is on Saturday, so if you’re thinking of coming along and haven’t already, let us know. There will be about 8 people we think, with a person or two yet to confirm. So not massive, but I think it’ll be fun all the same. More information, if you don’t already know about it, is available on the forums.

UK Meetup

Posted 30.10.2006 by carldr.

It’s less than two weeks away, and we’ve sorted out the details of our meetup on November 11th in Manchester, UK.

The basic plan is that we’re meeting at The B Lounge Piccadilly (Google Maps) – Mancunians might know it as The Brunswick – from about 12:30pm on Saturday, November 11th. We’ll be in there most of the afternoon before moving on, so it won’t matter if you want to turn up a little later. We’re looking at about 6 confirmed people at the moment, but we’re hoping a few more people will turn up.

We’ll post more information in the forums, so head over there if you have any questions.

Conway's Game Of Life

Posted 27.10.2006 by carldr.

Another Friday challenge, and one most of you should be familiar with – Conway’s Game of Life. You need to implement this example of cellular automaton and take the cells through a number of generations. Visit the Conway’s Game of Life page for all the information you could possibly want.

Thanks to flagitious for this challenge!

Not much other news to tell you about at the moment, I’m afraid. I’m sure something interesting will happen Any Day Now!

Switchboard

Posted 20.10.2006 by carldr.

Here’s a new challenge to help you get through your Friday.

In Switchboard, you receive a diagram of some wiring. The wires may cross over each other and your task is to follow the paths of the wires to deduce the order of the wires at the bottom. It should be a lot simpler than the previous challenge. All the information you require is on Switchboard’s challenge page.

Mark Byers is to thank (or blame, depending on your point of view!) for this challenge. Thanks again Mark for submitting it!

I should mention that there has been a bit of activity at the top of the leaderboard recently. Shinh has already submitted an entry for Switchboard (Hanging around the IRC channel means you get to hear about the new challenges first!) and is up to 1st place with 134,612 points, pulling about 15,000 points ahead of mame in 2nd and about 17,000 ahead of jojo who’s now in 3rd.

Looking at the rest of the scores in the top 10, we should see some more activity over the next couple of weeks, but will anyone be able to catch the current Code Golf master, Shinh?

Python Modules

Posted 16.10.2006 by carldr.

Some of you will have noticed recently that modules like time, calendar and hashlib have been available to Python users, and have given them an advantage in challenges like SHA-256 and Calendar. These modules shouldn’t have been available – It was a problem within Code Golf, caused by the recent upgrade to Python 2.5, that meant they were. Their availability has now been removed.

Since their use wasn’t permitted, and in the interests of fairness across all the languages, I’ve removed all entries which used these modules when entering the SHA-256 and Calendar challenges. If you’ve noticed that your entries have disappeared, this is why.

It may be that I’ve removed legitimate entries, but I was over-cautious to ensure I got all the ones I had to – Simply re-submit your entries, they’ll be accepted as normal.

Sorry for the inconvenience this has caused, and I apologise for wasting the time of the users who have had their entries removed, especially if you didn’t realise that the use of these modules were not permitted.

Thanks to the few people who reported this and brought it to our attention. Your help is very much appreciated.

Python Updated

Posted 13.10.2006 by carldr.

A quick note to say that the version of Python running on Code Golf is now 2.5. You can check out the New Features, and perhaps more importantly, Porting To Python 2.5.

One change may cause problems with people who have 8-bit characters in their code – It’s now considered a syntax error unless you have an encoding declaration. If there are any other gotchas that people find, please let us know in the forums!

Paint By Numbers Challenge

Posted 09.10.2006 by carldr.

After a break of nearly two weeks, we finally have a new challenge! Paint By Numbers is a logic puzzle where you get a set of clues and an empty square, and you have to deduce which cells are to be filled in that square. It should be more difficult than the recent challenges, but don’t let that put you off! Read more about it on the Paint By Numbers challenge page.

The challenge was suggested and submitted by Mark Byers, so many, many thanks to him. And hopefully he doesn’t already have a sub-100 byte solution!

One other feature has been added to Code Golf today – The Challenge Summary page. It gives you an overview of all the challenges and how you are doing in relation to the top spot. This should let you know at a glance the challenges you are off the pace on, and I hope you all find it useful.

Oblongular Number Spirals

Posted 26.09.2006 by carldr.

If you liked Numeric Diamonds, you’ll like this new challenge too. All you need to produce a spiral of numbers, all squeezed into a nice rectangle. See here for more details!

As an aside, if anyone has some good ideas for challenges, we would welcome some suggestions, especially if they are difficult ones! Leave your ideas in the Challenge Suggestions Forum.

For those who can make it, we’re planning a meetup in Manchester, UK on the 21st October – See the forum post for more details, although there hasn’t been much finalised yet!

Pi Challenge, And Language Updates

Posted 17.09.2006 by carldr.

You will all have used Pi at some point or another, but I wonder how many of you have tried to write some code to calculate it? Well, that’s what the latest challenge is asking you to do – Calculate the first 1,000 digits of Pi!

We’re not giving you too much help with choosing the right algorithm to implement, but there are plenty of resources available on the Internets which will hopefully point you in the right direction. For more details, see the 1,000 digits of Pi page.

As a slight aside, we’ve updated the versions of two of the interpreters we use – PHP is now version 5.1.6 and Ruby is now 1.8.5 (2006-08-25). I don’t think these upgrades will affect anybody, but I’d be interested to hear if they do!

Vigenere Cipher Challenge

Posted 11.09.2006 by carldr.

It’s a few days later than planned, but here’s a challenge to temporarily ease your boredom. You have probably heard of the Caesar cipher, and the Vigenere cipher is based on it. Your task is to write some code which takes a keyword and some plaintext and using the Vigenere cipher, produce the ciphertext. Read more about the Vigenere cipher challenge here.

This week’s challenge will see a return to the much more involved code that challenges like SHA-256 Hashing and Calendar required.

Away from the challenges, you might have already noticed that the forums are back and operational, and that we finally have an RSS feed of the news.

I’ve been incredibly busy for the past couple of weeks, and coupled with a bit of a disaster with the server at the end of last week, there hasn’t been as much development on Codegolf as I would have hoped. Hopefully things have calmed down a little now and we’ll finally be able to get the per-user profile page launched and resolve what we’re going to do about closing challenges.

Anyway, what are you waiting for? Get golfing!

Total Triangles Challenge

Posted 23.08.2006 by carldr.

After the SHA-256 Hashing challenge, I promised a couple of easy challenges. While this challenge doesn’t qualify as easy, it certainly should appeal to more users. To find out what’s involved, visit the Total Triangles Challenge page.

As a slight aside, so you know when to expect them, future challenges will be released on Thursday mornings (GMT). Also, look out for a few new features over this weekend. We’re being deliberately sketchy over what they’ll be, but it’s almost certain that there will be some sort of per-user profile page.

SHA-256 Challenge

Posted 16.08.2006 by carldr.

I bet you’ve all dreamt of implementing your own hashing function and learn a bit about cryptography while you’re at it! Well, here’s your chance – Implement the SHA-256 hashing function.

It’s easier than you think, pseudocode is included!

Changes to Crossword

Posted 13.08.2006 by carldr.

Due to feedback on the IRC channel, we’ve changed the Crossword challenge slightly – The fourth run, which was originally hidden so you didn’t know what input to expect, it now available to be viewed. This should make it a little easier to get your code to pass.

Forums and IRC

Posted 10.08.2006 by carldr.

One of the most requested features so far has been for forums, so we’ve gone and implemented some for you. They are pretty basic, but they’ll do the job and we’ll improve them over time.

So, if you’ve got any questions or if you’re just desperate for some clues on how to reduce the size of your code, please visit them.

In addition to the forums, we’ve also got an IRC channel for code golfers to hang out in – #codegolf on irc.freenode.net.

There are already a few people hanging in there, although they are mainly UK-based, so if there doesn’t seem to be much going on, please check back.

Pascal's Triangle Challenge

Posted 09.08.2006 by carldr.

This week’s challenge is something that should all remind you of your math classes at school. Very simply, you need to calculate and display the first 34 rows of Pascal’s Triangle.

For all the details, and for the exact format you need to match, view the Pascal’s Triangle challenge page.

Brainfucked!

Posted 02.08.2006 by carldr.

Yet another challenge for you eager people to get your head around. Not only do you need to know one of the supported languages for this one, but you also need to learn all about brainfuck.

Don’t worry, as usual we give you all the information you need! Read about the brainfuck challenge.

Latest Challenges [View All]

Guns And Zips
Something to keep you busy
898 days old.
Saving Time
A Byte In Time Saves Nine
1263 days old.
Choose
What language will you choose?
1480 days old.
Grid Computing
We're Back!
1520 days old.
Tower of Hanoi
To recurse, or not to recurse, that is the question.
1757 days old.

Active Challenges [View All]

Choose
What language will you choose?
9 entries in the last seven days.
99 Bottles Of Beer
Does your code sing?
6 entries in the last seven days.
Total Triangles
Find the best scoring path through the triangle.
5 entries in the last seven days.
Home On The Range
It's as simple as "1 2 3 5 6 8" => "1-3, 5-6, 8."
3 entries in the last seven days.
Dancing Queens
How many moves can the queens make?
3 entries in the last seven days.