Programming Jokes February - Obligatory Witty Remark
1,291 replies, posted
[QUOTE=BlkDucky;40220785]They are completely optional in Lua though
[editline]9th April 2013[/editline]
pls don't use them[/QUOTE]
Although they are optional, there is at least one case where they can be used to prevent ambiguous statements:
[lua]foo("Something");
(bar or print)("Something Else")[/lua]
This would cause an error (or produce unexpected behaviour) without the semicolon as the return value of foo would be called with (bar or print) as an argument.
[QUOTE=MakeR;40221173]Although they are optional, there is atleast one case where they can be used to prevent ambiguous statements:
[lua]foo("Something");
(bar or print)("Something Else")[/lua]
This would cause an error (or produce unexpected behaviour) without the semicolon as the return value of foo would be called with (bar or print) as an argument.[/QUOTE]
Same reason my language forces semi colons.
[QUOTE=MakeR;40221173]Although they are optional, there is atleast one case where they can be used to prevent ambiguous statements:
[lua]foo("Something");
(bar or print)("Something Else")[/lua]
This would cause an error (or produce unexpected behaviour) without the semicolon as the return value of foo would be called with (bar or print) as an argument.[/QUOTE]
You wouldn't write code like this normally though.
[QUOTE=Mega1mpact;40210797][img]http://i.imgur.com/BlOpvNQ.png[/img]
It's so easy to get everyone mad.[/QUOTE]
[video=youtube;6CTyb89iRLw]http://www.youtube.com/watch?v=6CTyb89iRLw[/video]
[QUOTE=Killervalon;40232049][video=youtube;6CTyb89iRLw]http://www.youtube.com/watch?v=6CTyb89iRLw[/video][/QUOTE]
I would watch that.
[media]http://www.youtube.com/watch?v=b-Cr0EWwaTk[/media]
This vid was actually made by the guys at Java
[editline]10th April 2013[/editline]
I don't even
It's... very good.
At the risk of getting answers that are going to give me a hemorrhage:
What is the single worst piece of coding you've ever seen, be it merely poorly looking or needlessly complex or if it brought down the program it was running in?
[QUOTE=Mega1mpact;40266337][url]https://github.com/Daimyo21/BaseBuilding-DayZ/pull/9/files[/url][/QUOTE]
Shouldn't it be
[cpp]if (_cnt <= 600 && _cnt % 10 == 0) then {[/cpp]
?
[QUOTE=Chris220;40266738]Shouldn't it be
[cpp]if (_cnt <= 600 && _cnt % 10 == 0) then {[/cpp]
?[/QUOTE]
Derp.
*insert excuse here*
[img]http://i.cubeupload.com/PnmG0y.jpg[/img]
Maybe there isn't a modulo operator in their scripting syntax?
[QUOTE=vombatus;35902125]I know it may not be a joke, but it always shines a light of optimism while programming and makes me giggle
[code]#define ever ;;
int main()
{
for(ever)
{
...
}
}[/code][/QUOTE]
This gave me inspiration for this piece of code
[B]life.c[/B]
[CODE]
// Life of a programmer
// Version 1.0
#include "life.code"
int life()
{
for(ever)
{
do("Write code\n");
}
until death;
}
[/CODE]
[B]life.code[/B]
[CODE]
#include <stdio.h>
#define ever ;;
#define do printf
#define death 0
#define life main
#define until return
[/CODE]
Do is a keyword. Perhaps write("code"); ?
[QUOTE=Lexic;40313180]Do is a keyword. Perhaps write("code"); ?[/QUOTE]
yea, but it compiles and work ?
[QUOTE=Neo-Claw;40313511]yea, but it compiles and work ?[/QUOTE]
just because it's legal doesn't mean it's moral
the preprocessor is just straight text replacement
any other code you write such as
[cpp]
do
{
i += process();
} while (i < 500);
[/cpp]
will generate compile errors.
not to mention write("code") just reads a lot better
And do-write-code sounds like a piece of actual code. The thing your joke targeted to replace with regular English for comedic effect.
[cpp]
#include "programmer"
your life
is
just
writing code
until the
day you
die
[/cpp]
programmer:
[cpp]
#include <stdio.h>
#define your int
#define life main()
#define is {
#define just do
#define writing printf
#define code ("code");
#define until while
#define the (1);
#define day return
#define you 0;
#define die }
[/cpp]
v:v:v
[url]http://james-iry.blogspot.nl/2009/05/brief-incomplete-and-mostly-wrong.html[/url]
Read it. It's great.
[editline]13th May 2013[/editline]
A small excerpt
[quote]
1995 - At a neighborhood Italian restaurant Rasmus Lerdorf realizes that his plate of spaghetti is an excellent model for understanding the World Wide Web and that web applications should mimic their medium. On the back of his napkin he designs Programmable Hyperlinked Pasta (PHP). PHP documentation remains on that napkin to this day.
[/quote]
[img]http://i.imgur.com/TDHuO8o.png[/img]
Today I argued with one dude for something:
...
He: yes and no
Me: so no, because true && false = false
I tought it was funny :D
[IMG]http://i.imgur.com/jsGFc7x.jpg[/IMG]
I think its kind of funny because in DOS it says syntax error but in cmd it says this.
[QUOTE=buster925;40803386][IMG]http://i.imgur.com/jsGFc7x.jpg[/IMG]
I think its kind of funny because in DOS it says syntax error but in cmd it says this.[/QUOTE]
This man speaks the truth.
[img]https://dl.dropboxusercontent.com/u/15606445/banana.png[/img]
why is the device name BANANA
Why not.
[QUOTE=lavacano;40810005]why is the device name BANANA[/QUOTE]
Boredom?
[QUOTE=lavacano;40810005]why is the device name BANANA[/QUOTE]
I really can't remember, it just had it's first birthday yesterday.
Sorry, you need to Log In to post a reply to this thread.