|
They're still dreck, but people somehow manage to overcome this and build useful things with them.
|
|
|
|
|
|
Richard MacCutchan wrote: Only in Java. C,C++ and C# it goes on the next line under the "i" character I was speaking in terms of coding professionals and should have made that clearer!
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
W∴ Balboos, GHB wrote: coding professionals All of whom adhere to their own personal standards.
|
|
|
|
|
Quote: Opening brace on same line as conditional
I used to prefer that style, but as I keep introducing more and more self-explanatory variable names, conditions tend to get long, and multiline conditions are not uncommon in my code. And then this happens:
if (my_condition && my_other_condition ||
use_other_condition_flag && other_condition) {
do_something();
} and suddenly the egyptian style didn't seem to be so great anymore! Compare to this:
if (my_condition && my_other_condition ||
use_other_condition_flag && other_condition)
{
do_something();
} Here the actual if code block is much easier to recognize!
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
Except I would have indented the do_something();
It's really all personal eye-candy - I really don't like all of (almost) empty lines breaking things ups - just indented blocks do adequately.
For really long conditionals (sometimes it happens) I actually will "format" them, themselves, so as to create a more visually orderly condition - somewhat as you did although possibly more than one per line if they're not complex.
Most important of all: consistency to aid in updates, help track bugs, and avoid bugs in the first place. The last seems to always somehow be theoretical.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
When code was a bunch of if/gotos, you never indented more than 1 level!
Probably goes back to basic style guides for non-code writing as well.
|
|
|
|
|
I think that's kind of the point of the pro-tab crowd: you can set your preferences to whatever works for you.
BTW, I agree that 8 is too much.
|
|
|
|
|
Since "way back", I have always used a 4 spaces tab setting on all C (and Perl, C++, etc) languages, 8 spaces tabs or no tabs on everything else. And so did pretty much everyone else in those days.
|
|
|
|
|
I believe the convention goes back typewriters, which may have picked it up from typesetting. Approximately 80 characters per typewritten line on a standard sheet of paper. If you break that into 10 columns (so you can make tables), you start a new column every 8 characters. So when typing a table, you would enter something, hit the tab key which would take you over the "remaining" amount of the 8 characters, then type your next column. If you just hit the tab key, you went over 8 characters to leave that entry in the column blank.
Come on people - I'm not the only "old fart" around here. Surely I'm not the only one that learned to type on a typewriter rather than a teletype or PC keyboard!
|
|
|
|
|
|
I assume he'll also be going on a diet.
Monday starts Diarrhea awareness week, runs until Friday!
JaxCoder.com
|
|
|
|
|
?
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
As you observe activity of my work, doesn't that prove I'm displaying?
The best way to improve Windows is run it on a Mac.
The best way to bring a Mac to its knees is to run Windows on it.
~ my brother Jeff
|
|
|
|
|
You are displaying and not displaying at the same time; you are both, until I look.
Before mankind observed the universe, there was chaos.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
You have just invented "Shrodinger's Work" !
|
|
|
|
|
Eddy Vluggen wrote: Before mankind observed the universe, there was chaos.
And afterwards?
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
I just saw this newly released book, Hands-On Software Engineering with Golang: Move beyond basic programming to design and build reliable software with clean code: [^]
Are Go and Golang the same thing?
I looked it up on wikipedia:
Quote: Go (incorrectly known as Golang,[14]) is a statically typed, compiled programming language designed at Google[15] by Robert Griesemer, Rob Pike, and Ken Thompson.[12] Go is syntactically similar to C, but with memory safety, garbage collection, structural typing,[6] and CSP-style concurrency.[16]
So I checked out the reference from the official Go site and look:
official site says: Is the language called Go or Golang?
The language is called Go. The "golang" moniker arose because the web site is golang.org, not go.org, which was not available to us. Many use the golang name, though, and it is handy as a label. For instance, the Twitter tag for the language is "#golang". The language's name is just plain Go, regardless.
I'm glad we straightened this little issue up.
|
|
|
|
|
At least with golang, you can search for it, and be reasonably sure that you're going to find things about the go languange. Searching for just go, on the other hand ...
|
|
|
|
|
|
|
raddevus wrote: I'm glad we straightened this little issue up. This will make a huge difference to my lifestyle.
I do feel compelled, though, to comment that if the idiots who gave it such a fruggin' stupid name were to have named it better, there wouldn't be any need for them to get pathetically snooty about it.
Maybe I'm getting jaded, but I'm not feeling any surprise that the company that declares itself to be the world's greatest expert in Internet search doesn't have a clue how to give their products names that are searchable.
They might as well have called it "the" or "I".
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Actually, if I Google "Go", the first two results are "The Go Programming Language" and "Downloads - The Go Programming Language".
The world's greatest experts in Internet search make sure it's searchable
With Bing and DuckDuckGo it's a little further down, but still on the first page.
Of course those results are all custom made to my profile and I'm a programmer.
|
|
|
|
|
The first result isn't a Wikipedia entry about the oriental board game?!
Indeed, Google must be "tweaking" the results. At least this one is a little more innocuous than their other "tweaks".
|
|
|
|
|