Hi,
As you can probably guess from my posts so far I enjoy doing fun and
interesting coding as a hobby. I was wondering if anyone knows of any Golf
style competitions for C? (I.e. winner is the programmer whose program has
the lowest number of characters in the source code that completes a specific
task)
If people don't know of one then perhaps we could arrange an informal one.
--------------
Jason Cooper 9 1776
J.L.Cooper wrote: Hi, As you can probably guess from my posts so far I enjoy doing fun and interesting coding as a hobby. I was wondering if anyone knows of any Golf style competitions for C? (I.e. winner is the programmer whose program has the lowest number of characters in the source code that completes a specific task)
If people don't know of one then perhaps we could arrange an informal one. -------------- Jason Cooper
heheh... interesting idea but I'd find a competition over the size of the
executable better, but then again....that might be more the compilers'
fault/credit...
ml
"J.L.Cooper " <A@A.COM> wrote in message
news:cn******** **@sun-cc204.lut.ac.uk ... Hi, As you can probably guess from my posts so far I enjoy doing fun and interesting coding as a hobby. I was wondering if anyone knows of any
Golf style competitions for C? (I.e. winner is the programmer whose program
has the lowest number of characters in the source code that completes a
specific task)
If people don't know of one then perhaps we could arrange an informal
one.
Minimizing source code makes it hostile to good-programming form. If you
want golf, then I'm only too happy to offer my projects for five bucks a
skin. I would suggest that the means to judge the better project be:
1) ANSI/ISO compliance
2) portability
3) demands on memory
4) demands on CPU
MPJ Minimizing source code makes it hostile to good-programming form. If you want golf, then I'm only too happy to offer my projects for five bucks a skin. I would suggest that the means to judge the better project be: 1) ANSI/ISO compliance 2) portability 3) demands on memory 4) demands on CPU MPJ
Actually I have found that Golf competitions can really help people a lot.
When I was teaching C I found that the better way to get students to
understand why they should write in a consistent easy to read style was to
have their first tutorial question as a golf style question. then in a later
tutorial have them go back to their solution and modify to handle a slightly
different situation.
--------------
Jason Cooper
In <gd************ ********@comcas t.com> "Merrill & Michele" <be********@com cast.net> writes: "J.L.Cooper " <A@A.COM> wrote in message news:cn******* ***@sun-cc204.lut.ac.uk ... Hi, As you can probably guess from my posts so far I enjoy doing fun and interesting coding as a hobby. I was wondering if anyone knows of anyGolf style competitions for C? (I.e. winner is the programmer whose program has the lowest number of characters in the source code that completes a specific task)
If people don't know of one then perhaps we could arrange an informal one.
Minimizing source code makes it hostile to good-programming form. If you want golf, then I'm only too happy to offer my projects for five bucks a skin. I would suggest that the means to judge the better project be: 1) ANSI/ISO compliance 2) portability
These are implied in such contests, when they take place in c.l.c.
3) demands on memory 4) demands on CPU
There are no universal metrics for such factors. Consider, for example,
the % operator. It is a lot more expensive on certain CPUs than on
others. And floating point arithmetic is very expensive on CPUs without
floating point support. How do you compare the demands of various
standard library function calls? Is the version using two putchar and
one puts call more or less demanding than the version using a single
printf call?
The best you can do in this area is comparing the asymptotic behaviour of
the algorithms used in terms of the number of elementary operations
performed, but then, the contest belongs to comp.programmin g....
Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Currently looking for a job in the European Union
"Dan Pop" <Da*****@cern.c h> wrote in message
news:cn******** **@sunnews.cern .ch... In <gd************ ********@comcas t.com> "Merrill & Michele"
<be********@com cast.net> writes:
"J.L.Cooper " <A@A.COM> wrote in message news:cn******* ***@sun-cc204.lut.ac.uk ... Hi, As you can probably guess from my posts so far I enjoy doing fun and interesting coding as a hobby. I was wondering if anyone knows of any Golf style competitions for C? (I.e. winner is the programmer whose program has the lowest number of characters in the source code that completes a specific task)
If people don't know of one then perhaps we could arrange an informal one.
Minimizing source code makes it hostile to good-programming form. If you want golf, then I'm only too happy to offer my projects for five bucks a skin. I would suggest that the means to judge the better project be: 1) ANSI/ISO compliance 2) portability
These are implied in such contests, when they take place in c.l.c.
3) demands on memory 4) demands on CPU
There are no universal metrics for such factors. Consider, for example, the % operator. It is a lot more expensive on certain CPUs than on others. And floating point arithmetic is very expensive on CPUs without floating point support. How do you compare the demands of various standard library function calls? Is the version using two putchar and one puts call more or less demanding than the version using a single printf call?
The best you can do in this area is comparing the asymptotic behaviour of the algorithms used in terms of the number of elementary operations performed, but then, the contest belongs to comp.programmin g....
Then let me rephrase. Since I'm no match for any of the regulars, I shall
be Fragesteller (don't know englisch dafuer), financier and judge. The
winner is a function of my good pleasure and receives, upon specifying a
place to send $5 to, assurance that a crisp Abraham is en route bearing
sufficient postage from the United States of America.
void createnewpost(i nt x, int *px);
MPJ
"J.L.Cooper " <A@A.COM> writes: As you can probably guess from my posts so far I enjoy doing fun and interesting coding as a hobby. I was wondering if anyone knows of any Golf style competitions for C? (I.e. winner is the programmer whose program has the lowest number of characters in the source code that completes a specific task)
I've occasionally seen informal competitions to do that here in
c.l.c. They can be kind of fun. Would you like to propose one
yourself?
--
int main(void){char p[]="ABCDEFGHIJKLM NOPQRSTUVWXYZab cdefghijklmnopq rstuvwxyz.\
\n",*q="kl BIcNBFr.NKEzjwC IxNJC";int i=sizeof p/2;char *strchr();int putchar(\
);while(*q){i+= strchr(p,*q++)-p;if(i>=(int)si zeof p)i-=sizeof p-1;putchar(p[i]\
);}return 0;}
"Ben Pfaff" <bl*@cs.stanfor d.edu> wrote in message
news:87******** ****@benpfaff.o rg... "J.L.Cooper " <A@A.COM> writes:
As you can probably guess from my posts so far I enjoy doing fun and interesting coding as a hobby. I was wondering if anyone knows of any
Golf style competitions for C? (I.e. winner is the programmer whose program
has the lowest number of characters in the source code that completes a
specific task) I've occasionally seen informal competitions to do that here in c.l.c. They can be kind of fun. Would you like to propose one yourself? -- int main(void){char
p[]="ABCDEFGHIJKLM NOPQRSTUVWXYZab cdefghijklmnopq rstuvwxyz.\ \n",*q="kl BIcNBFr.NKEzjwC IxNJC";int i=sizeof p/2;char *strchr();int
putchar(\ );while(*q){i+= strchr(p,*q++)-p;if(i>=(int)si zeof p)i-=sizeof
p-1;putchar(p[i]\ );}return 0;}
This looks like frenetic break dancing. MPJ
On Fri, 12 Nov 2004 11:34:12 -0600, Merrill & Michele
<be********@com cast.net> wrote: Then let me rephrase. Since I'm no match for any of the regulars, I shall be Fragesteller (don't know englisch dafuer),
Questionmaster?
Chris C
"Chris Croughton" <ch***@keristor .net> wrote in message
news:sl******** **********@ccse rver.keris.net. .. On Fri, 12 Nov 2004 11:34:12 -0600, Merrill & Michele <be********@com cast.net> wrote:
Then let me rephrase. Since I'm no match for any of the regulars, I
shall be (don't know englisch dafuer),
Questionmaster?
Chris C
Fragesteller: The person who asks a question and is forbidden from answering
it himself, else said question is rhetorical. MPJ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Simon |
last post by:
Hi,
I am having a little problem with my PHP - MySQl code, I have two tables
(shown below) and I am trying populate a template page with data from both.
<disclaimer>Now I would like to say my skills, especially with MySQL are
rudimentary</disclaimer> However my code (link below) fails, the nested
database call does not return any data and this has me stumped. Any help
will be much appreciated.
Many thanks in advance
|
by: Tuang |
last post by:
I'm checking out Python as a candidate for replacing Perl as my "Swiss
Army knife" tool. The longer I can remember the syntax for performing
a task, the more likely I am to use it on the spot if the need arises.
If I have to go off and look it up, as I increasingly have to do with
Perl's ever hairier syntax, I'm more likely to just skip it, making me
even less likely to remember the syntax the next time.
So I hear that Python is easier...
|
by: Mike Hoy |
last post by:
hi
i've been writing a golf game in text only. this was to work out some of
details. it's great but making a golf course with ---'s and |||'s is
kinda silly looking. (at least to some..)
now i'm ready to begin shopping for a gui widget to work with python so
my players can have some kind of pictures and possibly some motion.
i won't be creating figures swinging the golf clubs but would like to
|
by: Irene |
last post by:
Hi all again,
Well, I have my Athletics database with Athletes, Competitions, Scores
tables.
I have a ranking query where I get back the list of the
competitions-athletes and scores opportunely sorted.
I also want to be able to:
1) Select just the top <n> best scores
|
by: DGolfer |
last post by:
I have a Tabular Form which lists my score per hole in the way of "Par"
"Birdie" ect. I need to create a Text box which counts the number of times
"Par" is listed or each hole.
EG:
Form Name is: VPar1 Form
Field Name is: VPar01 (lists the data below)
Reord Source is: VPar1 (this is a query)
After 6 games Hole01 in the Tabular form shows:-"
| |
by: Blast |
last post by:
I need help modeling schema for a particular issue that i've never run
across before. And for the life of me, I cannot figure out how to model
it - at least in a way that feels correct. Please let me know if I need
to post this else where.
Here are the tables:
Reservation <------------Customer_Reservation <--------->Customers
|
by: futurexnanu |
last post by:
can someone please tell me where to post the codes and also wther we have any coding competitions here?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |