pouët.net

Go to bottom

Open source cooperative demoscene

category: general [glöplog]
optimus: show me the portal to your world, it seems more cheerfull than this one.
33: My boss says this piece of code is poor programming, will you fix it for me?

begin
select ename
into name
from emp
where empno=pni_empno;

return 0;
exception
when no_data_found then
begin
/* now here begins the program */
...
end;
end;

P.S. how about date2=(date%12)+1; ?
added on the 2003-01-28 10:40:57 by kurli kurli
"And don't make the mistake of lumping the
FreeBSD crowd together with the rest of the
opensource crowd. They just want to make a
good server-OS and have fun."

yeah, i know. but we were talking about open source software in general. and freebsd is open source software.
and btw, freebsd serves me well as a desktop.
i still use windows (warezed, of course) for demo watching purposes however.

and 33,



you're so cute =P
added on the 2003-01-28 11:55:50 by _ _
mfx, oreo .... I can't just let _216_ influence us with this poor coding method. I think coding is an art, and we should think efficiency. It's not because we have computers that can pump out 6 Gips that we have to waste all this power to perform useless redundant conditions (that's a first).

IN such a case, why wouldn't you consider using CASE instead of multiple redundant IFs in the first place???

Why use date or date2 when you are actually talking about current_month and next_month ?

rainmaker, I was looking all over the place for the C instruction that works like a base 12, I don't have a C book to validate this, but hopefully you found the key.

next_month = (current_month%12) + 1

33
added on the 2003-01-28 16:30:04 by 33 33
rainmaker & 33: Hm, you're both wrong :D

In the code _216_ pasted in, date2 won't be assigned to a value if date < 1 or date > 12.

In your code this will happen; well ok, I know date will probably always be in that range but the code you submitted gave those side-effects nevertheless

MOHAHAHAHAHAHHAHHAAHHHAHAHAHAHAhaHHAHAHHahahahahahahhahahehheahaheahehaheryqrgqyrdguqdaskjfaskf afadf adsf -> insanity
added on the 2003-01-28 16:33:26 by sofokles sofokles
Prolog, lisp and haskell demos sucks.
added on the 2003-01-28 16:40:55 by texel texel
Sorry for my post in the up of this, completely offtopic and stupid. What I want to say is that sofokles has shown a clear example of how cooperative coding works. The code produced by various people use to be better, free of errors, and for demoscene, for sure faster. You say that lamers could get the work of others and do better demos than them. But this is not true. If a "lamer" could do a very good, artistic and well designed demo, using the code he/she use, he/she is not a lamer at all. It would be an artistic freedom, since you could use more time to the art, less to the boring coding. And, if you like to program, nobody tell you "don't do it".
added on the 2003-01-28 16:47:36 by texel texel
(exit "lamer")
In case you didn't know, democoding IS art.
Real demos are all about the code.
added on the 2003-01-28 18:51:23 by Scali Scali
> It would be an artistic freedom, since you could use more time to the art, less to the boring coding.

if you find coding boring, why make demos? make art videos instead.
added on the 2003-01-28 19:12:06 by _ _
Heuristics are art. Just coding, implementing algorithms is not art at all. If you are copying any algorithm, you are only implementing it, it is not art. Even optimizing in the non-theorical level (hard level, a xor ax,ax is faster than mov ax,0, for example) is not art at all. Only if you make your own effects and create new ways of therically optimizing these, to solute problems (heuristic), it could be considered as art. But it is not one of the recognized arts anyway. And it is called art just because there is a non-concrete way to do it, it is a work of creativity and intelligence. But, I'm sure, that the most of the new demos does not create new algorithm for solving new problems, or anything. The new effects use to be mix of other effects. And the art in this case, is design art, even if it does contains code. If the code is very good (good use to be fast in demoscene), then it is a great piece of enginering, not a piece of art.
added on the 2003-01-28 21:30:02 by texel texel
Well, I have to agree that demoscene is not only art.
added on the 2003-01-28 21:38:16 by texel texel
There is a form of pleasure to be found in coding a program. Compare coding to making love. When you are coding a program, you are creating something from your own inspiration using a computer (chich is the tool, could be considered as the "other" individual) to give "birth" to the final new "being".

Coding is like making the embryo evolve. Alfa versions are CT Scans of the embryo, beta versions are premature births, and official versions, like 1.0 is a perfect birth and aknowledgment of that program to the world of computer community at the accepted normified program.

Having your newly born program copyrighted is like having your child baptized. You could make money out of that program, thus have it privately shared (individual in the workforce) or you could have your program shared for free (hippy mentality) in the same way that some individuals do (mIRC, Kazaa, etc...) in a community fashion, or a movement.

You could open source your program, and have everyone dysect it. Now there is where I have a problem... Would you let other people do child porn using your kid? How about selling your code (even ID are doing it...)???? If your program is pretty mature, like LINUX, how about giving it away like a sex slave having 5000 performing fist fucking like obsessed perferts making sure that the individual is in the perfect position for ultimate joy...

You probably got the idea...

33
added on the 2003-01-28 22:33:33 by 33 33
33, if i gave "c for beginners" to the person behind that code it would look like:

intvar = ( intvar ++ ) & 12 ;
added on the 2003-01-28 23:09:30 by 216 216
Excuse myself for perturbing your utterly small aura bubble _216_, but...

you don't learn errors in "C for beginners", hopefully. I have to fix your thinking now, because you clearly haven't tested what you have written.

I suspect that both intvars are different variables?

Now the goal was to assign another var with a content of "next month" value. BTW, I can't believe we are still worrying about htis, but here goes:

intvar = ( intvar ++ ) & 12

putting this into context would probably look like this:

next_month = ( current_month ++ ) & 12

or, like in the previous code:

date2 = ( date ++ ) & 12

Now, tell me what is wrong, if you really understand what you have written...

33
added on the 2003-01-28 23:23:05 by 33 33
BWHWAHAAHA
this thread is GREAT! :D

anyway, sorry if i'm about to destroy something here but: 33 - 216 (all these NUMBERS!! :D) wasn't being serious when he pasted those horrible code snippets, ok? He was meaning the *opposite* - ie that the "closed-source-code" wasn't that good either, and he provided some examples (most likely NOT created by himself, but by some moron at his work or something :)

ok? get it?
so please stop making a fool of yourself, it honestly hurt me to see you like this...
really! :)
added on the 2003-01-28 23:55:57 by sofokles sofokles
sofokles, so it prooves three things:

1) If you want to be open source, better think twice when you are coding like a lamer!!

2) Going open source is a good way to get your coding skills together

3) You obviously don't have humility

33
added on the 2003-01-29 00:06:16 by 33 33
33: coding can't be compared to making love unless you're into s&m sex.. I just wrote a blackjack game in pascal for school called schwartze steckfassung and it was nothing like making love.. then again I'm no coder ;)
added on the 2003-01-29 00:10:32 by violator violator
33: You're a very confused man.
added on the 2003-01-29 00:12:10 by sofokles sofokles
33: You're a very confused man.
added on the 2003-01-29 00:12:20 by sofokles sofokles
33, i'm not quite sure if you're serious so i'll just throw the spoilers here:

in the first snippet the coder hasn't grasped the idea that one can actually calculate things instead of forcing them in an idiotproof way. a c book is pretty worthless because he probably needs to learn how to program at all first. maths wouldn't hurt too though i would even try to explain modular arithmetic in this case.. finally, variable naming (1. month is a month not a date, 2. then, _what_ month?) gives a hint that it'll become pretty unreadable after a while..

the second one is called "what is strcmp", thus tweaked around with a precompiler, cute. note calling it a flag too. 50 lines down it'll be anything but obvious what it's used for.

third, max() ignores nulls but it may return one, so the nvl is in the wrong place. it also returns exactly one row. so why there's that too_many_rows lying around? laziness, ignorance?

fourth, some people use gotos for just about everything. i haven't found any reason for this. also, the dummy statement could be replaced with a null one but guess someone didn't know of such a thing.

fifth, nulls compare sometimes "strangely", so, hey, just put religiously nvl in each and every comparision! i know, i should have picked a select-example instead where it ruins indexing as a nice side-effect.

sixth, ok, fixing this one might actually require some brain and a real structure in a document. this is certainly way too much asked.

ok. anyone seen stuff like this in open source? no way. these are trade secrets :)
added on the 2003-01-29 00:13:10 by 216 216
(and so on)
added on the 2003-01-29 00:13:24 by sofokles sofokles
_216_, I don't believe that. I don't agree with 33. Sofokles looks to be completely smart, intelligent and he knows very well what he said. I'm with you Sofokles. So, what do you think about the reusing of the source codes of published demos? It is lame? It is copying? How many could you copy to being not told as a copier? What do you think about this?
added on the 2003-01-29 01:17:44 by texel texel
texel: coding can't be art? I really don't think that all paintes must invent their own canvas. Sure, not all coding is art, but to exclude democoding as an artform is ignorant. (roumers say that 216's code is kind of arty ;)
added on the 2003-01-29 01:56:37 by kusma kusma
not kusma, well, it could be art... but do you think as artistic as a good poem, a good draw or a good music??? It is very mixed in the code all of this, a code would generate drawings, music, and all, but I think, that the result of this is the artistic part, only the result, not the code itself. Other thing are the 256bytes effects, for example. You could call it artistic because it is an incredible job, but I look the code only as a very good work of engineering. If the code generates an artistic thing, it is art or not? Well, I can't tell the code itself as art. The result could be art. So, it looks as mixed. But my opinion is that since you could do millions of different codes that generate the same artistic thing, the code itself is not art. And, other thing, if you do an incredible fast effect, for example, the faster ever raytracer, with lots of things included in a raytracing engine, is this art? If you don't use it with an artistic scene, it is just a good code, not more, I couldn't call it art. For example, heaven7 is as good as it is because it is not only a very good raytracer with a very good compression ratio. Other demos/intros that uses the same technologies (the same effects) but some even faster, why are not better than heaven7. When I say better, I say intersubjetively better, I mean, that the most of the people things it is better (and heaven7 is in the top ten of the pouët list, for example, and other raytraced demos/intros are not). And, well, even if heaven7 were 4 mbs, not 64kbs, it would be a really good demo, at least in the artistic part.
You could tell me that some codes would be pieces of art by itself and put me the example of that codes with poems, that could be seen in the ofuscated C programming compos, but the poems are poems, even if are mixed with code.
In any case, I am an expert in nothing to say what is art and what is not. It is only my own opinion. And about painters... it is supposed to be art the canvas, the brushes, and the inks used for a paint? It is art the way a drummer play its drums or the sound this generates? It is art a group of symbols that generate words of a poem or the meaning of this symbols?
added on the 2003-01-29 02:39:54 by texel texel

login

Go to top