|
Ate a lot of fish - right?
Get me coffee and no one gets hurt!
|
|
|
|
|
|
|
No, I would have remembered that!
|
|
|
|
|
I've had the option once, but the smell ... well let's suffice to say my gym socks smells one h*** of a lot more appetizing ...
Espen Harlinn
Senior Architect - Ulriken Consulting AS
The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.Edsger W.Dijkstra
|
|
|
|
|
Quote: Went to Iceland last year, what an enchanting place.
We would like to go there too
Espen Harlinn
Senior Architect - Ulriken Consulting AS
The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.Edsger W.Dijkstra
|
|
|
|
|
I've bookmarked it after you posted it and listened to it yesterday.
Certainly something I'll listen to more often
Going to recommend to some friends as well
You might like Sigur Rós, although that's a bit more dreamy I guess.
|
|
|
|
|
Quote: You might like Sigur Rós, although that's a bit more dreamy I guess.
Dreamy, but so far I like what I'm hearing - thanks
Espen Harlinn
Senior Architect - Ulriken Consulting AS
The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.Edsger W.Dijkstra
|
|
|
|
|
I implemented a special feature for one of our customers in the current generation of one of our products. A couple of weeks ago they asked to have it added to the older generation as well. No problem, right?
Wrong.
I've backfit about 80% of the code changes, and I just realized something. The older code base uses K&R braces. The new code base has been reformatted for Allman braces. I've been copy/pasting bits of code for the last several days, and just noticed.
I'm doomed.
Software Zen: delete this;
|
|
|
|
|
Brace yourself!
|
|
|
|
|
+5
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Despite @SanderRossel's objections, this is why i use braceless if statements. There's nothing to convert.
Real programmers use butterflies
|
|
|
|
|
I don't even know how to respond to that
And I had to look up both K&R and Allman style, didn't even know that was a thing
To me it's the .NET or Java(Script) style
I've also just learned there are very perverse, yet "official", methods of bracing you code
|
|
|
|
|
You should do this religiously by creating a function for each if or else clause that needs more than one line of code!
|
|
|
|
|
Reminds me of Microsoft .NET's ForEach() method
Real programmers use butterflies
|
|
|
|
|
I just threw up in my mouth.
Software Zen: delete this;
|
|
|
|
|
You should have used Whitesmiths all along!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
You're not doomed. You just won't get dinner and a movie.
|
|
|
|
|
For someone too lazy to look it up, what’s the diff?
edit============
Never mind - I looked it up, and I use allman... I never knew there was a name for it
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
modified 21-Feb-21 16:36pm.
|
|
|
|
|
K&R: left brace goes at the end of the line
Allman: left brace goes on its own line, not indented from previous line
|
|
|
|
|
There's a good summary of all the styles here:
Indentation style - Wikipedia[^]
I always thought my braces style was unique: Now I see it even has a name (Allman). Well, you live and sometimes you even learn!
Get me coffee and no one gets hurt!
|
|
|
|
|
Upvote for teaching me something!
Get me coffee and no one gets hurt!
|
|
|
|
|
Brian Kernighan is a man.
Dennis Ritchie is a man.
Hence K&R consists of only men.
QED
K&R braces are All-man braces.
Problem solved.
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
Bonus points for a delightfully contrary reply!
Software Zen: delete this;
|
|
|
|
|
Since I took up Visual Studio, I've been programming C#. In C# context, there is no similar issues: You just set up the line break, indentation rules and bracing style you want, delete and retype the closing brace, and that is it.
I assume that VS can do the same for C / C++ code.
Sure, if your source file style is to make every function, no matter how tiny, into its own source file (with typically 60 lines of copyleft, 20 lines of #include and 10 lines of C code), then you probably have a several thousand files to open. All C++ code I have been handling had the entire class definition, with all its methods, in a single file. If you have several thousand classes, then you are talking about a huge system! (Or possibly a poorly chosen class structure.)
|
|
|
|