GNU is acceptable if it's using either tabs or spaces, but not both.
Allman is acceptable.
K&R is king.
Name:
Anonymous2009-07-29 12:45
>>-
Please observe official /prog/ style from now on. Thank you.
static char *concat
(
char *s1, char *s2
)
{
while
(
x == y
)
{
something();
somethingelse();
}
finalthing();
}
Name:
Anonymous2009-07-29 12:45
(modified?) Allman style, two spaces, without omitting braces even in single statements, and the three-line else. Yeah, call it waste of space, I don't give a flying Philadelphia fuck.
I was looking at styles earlier, and I don't see why there are no common/official styles that appeal to me. I was about to say that I use BSD style, but then I noticed that it has Java-style else statements.
for (int i = *yumyums; i > 0; i--) {
result = i * i;
result = i ^ result ^ 0x55;
if (result > 0x50000000) {
results.push_back(result);
}
else {
i++;
}
}
}
>>26
Do those that use See/Sepples actually write code like that in production environments? If so, you're a fucking liability to any company that has the misfortune of hiring you.
>>27
No. Those that code in any language within a group follow that group's style guidelines regardless of their personal preferences.
Of course, you'd know this already if you had ever programmed for a living.
>>30
Clearly. The prompt is "how do you indent" and he claimed to have fixed the code. "How do you indent" very obviously implies "how do you indent [when you have control of a project's style]"!
If he were to start a project for hire, it's probable that he would have the ability to set the style guidelines and would actually write code like that. That is a liability and it has nothing to do with conformance to style guidelines put forth by others due to the nature of the prompt.
>>31 If he were to start a project for hire, it's probable that he would have the ability to set the style guidelines and would actually write code like that.
That's right. I would code like >>26 . I find nothing wrong with that style. If you want to work with me as your project manager, you should at least be able to understand that.
If you find it hard to read code just because there's no whitespace around the operators then I don't need you in my project, since you've obviously haven't been exposed to enough code styles.
Ideally, every C/++ programmer should be able to at least use and understand K&R, Allman, and GNU.
>>32
And when your ass is dead, your code that entirely lacks maintainability is nothing but a burden. That makes you a shitty programmer and nobody needs you.
Name:
Anonymous2009-07-29 16:27
>>1
It's widely accepted that anyone who seriously proposes anything remotely similar to the GNU bracket placement, including the GNU coding standards themselves, are obvious trolls.
My personal theory is that RMS introduced them in an attempt to uglify C enough to make it look inferior to Lisp. He failed, and the people WHBT went forth and spread one of the most disgusting indentation styles known to humanity short of random.
Name:
Anonymous2009-07-29 16:27
>>34
Code doesn't lack maintainability because of style*. It lacks maintainability because it was horridly designed or because there aren't enough comments. Magic numbers and hacks also help.
*Except in extreme cases. See >>33 . On the other hand, there are code beautifiers.
I once tried to use python interpreter and got sick of it pretty fast.
I don't waste any time on indentation, i'm not a loser who thinks his code must be some "quality product".
Art value is in code, not in its appearance.
___________________________________ http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
Experience is never limited, and it is never complete; it is an immense sensibility, a kind of huge spider-web of the finest silken threads suspended in the chamber of consciousness, and catching every air-borne particle in its tissue.
>>62 Thats your personal opinion. I don't expect people from the street to judge my code fair too. >>63 I have a different set of aesthetics.I'm not impressed by outward qualities of a thing.
________________________________________ http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
When the tyrant has disposed of foreign enemies by conquest or treaty, and there is nothing more to fear from them, then he is always stirring up some war or other, in order that the people may require a leader.
>>65 People who can understand the art value of my code are rare on /prog/.
_______________________________________________ http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
Bureaucracy destroys initiative. There is little that bureaucrats hate more than innovation, especially innovation that produces better results than the old routines. Improvements always make those at the top of the heap look inept.
>>68
I happened to have talked to the specific tribes you refer to. They agree with me.
Name:
Anonymous2009-07-30 13:50
I think that if some Brazilian tribal guy saw your code, and indented and monospaced code, he would find the latter more aesthetic, as for him, your code would be just a bunch of random wriggles (as opposed to random wriggles laid out in with some regularity (``OOGA BOOGA LEFT SNAKE GLYPH RIGHT SNAKE GLYPH'')).
>>69 I don't believe it until you get a notarized voice recording and unbiased third-party translation.
__________________________________________ http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
When despotism has established itself for ages in a country, as in France, it is not in the person of the king only that it resides. It has the appearance of being so in show, and in nominal authority; but it is not so in practice and in fact. It has its standard everywhere. Every office and department has its despotism, founded upon custom and usage. Every place has its Bastille, and every Bastille its despot. The original hereditary despotism resident in the person of the king, divides and sub-divides itself into a thousand shapes and forms, till at last the whole of it is acted by deputation. This was the case in France; and against this species of despotism, proceeding on through an endless labyrinth of office till the source of it is scarcely perceptible, there is no mode of redress. It strengthens itself by assuming the appearance of duty, and tyrannises under the pretence of obeying.
Name:
Anonymous2009-07-30 14:11
>>68-71
It doesn't even matter. If someone was to try to find the inner beauty FV speaks of, they would invariably need to know C.
>>71 Well, i have my own sense of humor.
If you insist on representing everyone on Earth, you can represent me as well, but since i hold quite opposite views you cannot and your statement has a bogus quality in it.
>>74
I don't count you as population. I think you're an entity that came into existence spontaneously as a result of condensed trolling and fail.
I also don't think you're over the age of six.
________________________________________________ http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
We are subjects of law's empire, liegemen to its methods and ideals, bound in spirit while we debate what we must therefore do.
The entrance is on the right, yet you walk leftwards, duh In all modern supermarket the slave MUST follow a counterclockwise direction: 95% of the population of the world has a slight imperfected equilibrium, they tend to the left... if you leave somebody alone lost in the desert (don't do it :=) he'll begin tu turn round counterclockwise. That's the reason most modern supermarket have a "counterclockwise" layout... which btw has other consequences and hidden commercial meanings, as you will see in the following
Why do they start with fresh fruit?
Reason Number 1: People coming inside a supermarket tend to conserve the velocity and the inertia of the streets... they would "jump" the first 10 meters of merchandises if you did not stop them with the explosion of colours and smells that only fresh fruit can offer. Notice, moreover, that merchandises in the first ten meters are almost wortless just in case: potatoes, onions... the expensive fruits-sorts are more distant, so that people will be able to pick them once having 'calmed down'.
Reason number 2: The supermarket are subjected to the strong concurrence of the "discount" malls ("poor people" supermarkts, the ones with ugly boxes and cheaper prices), which (mostly) do not have fresh fruit, but only conserves... first thing when he comes in: the slave must be assured, palping a red nice apple, that he is in an "exquisite" special frish shop (little does and should the slave know about the products used to 'polish' and shine that apple, btw).
Note that the disposition of the fruit and vegetables is NOT casual (far from it). The whole point in supermarket enslavement is that the very few thing that are really useful and 'must' be bought (say toilet paper, sugar, salt or wodka) are overwhelmed and interpolated with completely useless products and/or with much more expensive varieties and qualities of the same kind, because of the huge profits on those articles and of the smaller profits on basic products.
Light dances in your eyes, sounds enter your hears
Orange and apples with a lot of mirrors, Bananes and pears with a green surrounding, salads and potatos with clear light... red for meat (coz white light would make it look greysh) and so on... have a look at the illumination tricks in your mall next time you are compelled to go in.
Note also that the quiet music is necessary: the supermarkt would seem "dead" without it, but at the same time music must not be so heavy that it may disturb any consumeristic concentration... and it changes too... they know exactly at which time of the day "seniores" and at which time "youngsters" slaves are ususally consuming inside the malltrap, therefore you'll have music which is "calibrated" on the time of the day.
Expensive is easy, cheap is difficult
Producte are so positionated that the expensive ones are ALWAYS positioned "towards" the march direction of the slave: at the best height to be picked up. The cheaper varities of the same articles are always "behind" the march direction of the slave, and/or a little too low or a little to high.
Now stop and have a look at the varieties of a given product, say whisky, or honey (not wodka, it's not necessary, you should always and only drink Moskowskaja :=)
Humans (euroamericans) stroll with the eyes from left to right (like you are doing now, reading my lines), therefore notice how the CHEAPEST varities of a given product are on the left, the more expensive on the right, in the hope that slave's hands will be quicker as slave's brain (as it's often the case nowadays).
Funny, the fridges open all in a weird sense
Yeah, the doors are made in order to enforce the slave to see immediately other products, inside ANOTHER fridge as soon as he closes one where he has already 'consumed'. Would the doors close normally, his nose would be back against products he has already bought: no good. Note the disposition of the products inside the ice-boxes on the floor, too... it's far from casual as you can see... notice how far away are those products and how easy to pick up are these? Goddy! I believe we should drive school classes through the malls explaining all these tricks to the little future slaves!
May I NOT help you?
You'll NEVER hear a supermarket employee asking you "may I help you" in normal cases (unless you really and badly need it and you chase him), because that would limit the possibility of you buying a lotta other useless products instead of what you need, it would break the "magic", and in that dreaded case the slave could even come to the nasty idea to lower the blick on the trolley, instead of filling it -overwhelmed by soo muuuch choice- with everything he sees.
Besides the employees are really busy "filling" the spaces... it's very important that the products are positionated at a predetermined in-between distance and density... too many people on to narrow space and some slaves would "put back" the product they have in their hands, instead of deposing it in the trolley... an empty gap in an alley would break the magic
What are stoppers?
Stoppers are the "dynamic" part of a supermarket... most of the slaves come here twice in a week (at least) and do not want to see always the same things in the same places (they could come to the -right- conclusion that they are being 'drilled to buy') even if they at the same time want to be reassured... "I know where's the wine". Everything must stay where it was, but a part must move... hence the stoppers, little mountains of "offers", toilet paper to-day, shampoos to-morrow.
Capturing the audience
Supermarkets have also a 'local' hinterland as well. People that live in the vicinities and/or that have to 'pass' near it on the way back home from the office will tend after a while to use the same one more and more, for 'simplicity' reasons.
These people have been 'caught' by the supermarket: they are its 'captives'. Now, once your captives' base is great enough there is no reason no more to give them real choices, is it? Wouldn't be better - and more rentable - if all this people would buy grossomodo the same few products types? And would not it be even better if those same products would be not only sold but also produced by you? And that is exactly what regularly happens with all big chains: the 'own brand' products are being pushed more and more, through mere phisical presence and/or through advertisement or three for two schemes, while at the same time the choice of alternatives decreases more and more. It begins with potatoes, eggs and 'white products' of all kinds, it ends with "everything" offered as 'own brand'.
Thus the supermarkets, born inter alia with the implicit promise of a broader choice for consumers, try instead to reduce it more and more every time there is a possibility to do so.
Cry baby cry There are queues at the cashier. Note that there are almost ALWAYS queues: the turns are so calculated as to spare personal whenever possible, that means that there is always a 'queue lenght' that is considered 'acceptable' (the slave will not burst off leaving the charriot and jelling "never again!") and that they try to avoid, for obvious profit reasons, to have cashiers waiting for clients instead that the other way round. Bresides: there is money to be made through queues! In fact that's the right moment to bite the slave's kids, which are terribly annojed and exige the products that have been purposely put on the two sides of the cashier queue. Watch them, look at their prices... very very interesting this is really the "lower instinct" part: All these articles are chosen and calculated to give maximum profit, all products you would NEVER in your life come to buy but here, coz this is the only real (compelled) "canyon" that the slave must cross... "Dad, may I have this and that?". "Why shouldn't I buy those nice mints?"
Notice how these products are MUCH more expensive than the "three for one" confections of the same product that are sold inside the shop somewhere... but where? You will not know, coz that's exactly the sort of products you normally don't buy! How many time do I have to prove it to you
Teach your kid to use the waiting time to completely upset the order of these products, or do it yourself. These shelfs can also be very useful to dump all useless products that you did buy without noticing ever after having read this... best of all is to dump there a couple of frozen icecreams boxes upside down, they will slowly leak everything on so artfully positioned peppermints :=)
D'you want our "superadvantage" nice plastic card?
No! No! No! It's only a cheap, dirty trick to gather all possible data on your comportament whithout ever having to raise a finger. They'll know how much and when and where you drink/shit/eat/ love/cry/wash/sleep/etc and stuff their databases for free (notice how the "discounts" are lilliputian in comparison with what they steal you through the abovementioned tricks... did you know that 35% of the fridge products you buy will go directly from fridge to dustbin? That's the real average, duh)
So let's battle against them! Codebar! Understand! Explain others! Free the stupid slaves... watch the world around you free from petty convention and understand in what for an awful mess you are condemned to live!
Name:
Anonymous2009-07-30 19:24
>>88
A hacker is someone that performs a feat in a playful manner. It has nothing to do with computers. If you are a computer hacker, it means you've performed an impressive feat in a computer system.
Name:
Anonymous2009-07-30 19:25
Why don't we have a layer of abstraction between code and its layout?