The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
In our world, and our code reviews, this one line stuff has to go.
The coding standards should dictate the formatting.
BUT: The Situation can dictate exceptions. We have defensible and in-defensible deviations.
Blocks of similar code where reading one line is effectively the same in the block, we allow
the one line to create a "tabular" view of what is transpiring.
BTW, I don't consider breaking down the code into properly formatted statements to be dumbing down the code. I also think that different companies CAN AND SHOULD have different coding standards!
But overall, I believe if you can pick up a piece of code, and not know if YOU wrote it, or someone else on your team wrote it... Then you are cooking with gas.
I've seen a lot of discussion lately about single point of exit vs multiple points of exit. Since my IDE makes them easy to spot I've started using multiples more in if and switch. But when I see the code in a plain text editor it still can look a little confusing.
I frequently use multiple exits, to simplify the code structure, reducing nesting levels.
However, the last bug I fixed in one program that is my responsibility was related to this: A few months ago, I added a "try / catch / finally" to improve error handling. Within that "try" was an age old "return" for a rather curious case, hit only if the PC did not have a sufficiently updatet dotNet (and since updates are pushed from a central deployment server, this only happens if you plug in a portable that is not yet detected by the deployment server). Before the "return" was executed, the "finally" block was processed, which was certainly not appropriate in that situation.
I will certainly not stop sprinkling my code with return statements, but I have learned a lesson about paying attention to finally-clauses.
Anything that is unrelated to elephants is irrelephant Anonymous - The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944 - Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
...is the documentation.
Yes, I know it's boring.
Yes, I know there are more interesting things to do.
But if when you make a change to how something is done (i.e. remove it from the menu and tool bars and put it in the document body) you'd just give us all a elephanting clue how to use the damn thing? I knew where it was when it was "Edit...Fill...Range" - but now "Edit" doesn't have a "Fill" submenu at all, and neither does any other menu.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
I'm working through Akka.Net, attempting to implement and I have read tons of stuff just to get to basics.
And this one is _probably_ documented much better than 90% of open source projects.
However, once you start digging in and you need a specific answer you are going to suffer.
I was working with Scheduler and it wasn't working. I started reading the docs (Scheduler | Akka.NET Documentation[^]).
But when I got down to this section https://getakka.net/articles/utilities/scheduler.html#from-inside-the-actor^ then there was only one line and it made it look like I had to call the specific method from inside the actor (that's where my code was). However, that isn't true. There are other methods I can call too.
1. the web site search does not work
2. as usual samples are too contrived to help
3. things are just left undone / basically not documented
4. There's not overall story about how the functionality will really be used. Certain things are not explained very well and it creates confusion.
5. Also, when I google I often get to the Scala (and/or Java) version of Akka and things are different.
And, as I said, this one is documented really well.
In one project, we rejected one open source package, which really looked promising, but we would have to make a number of modifications to it.
The code was well commented. In French. With variable and function names in French. None of the project members mastered French.
So we rejected it. The replacement was not very impressive, and probably less suited. I can't say for sure, since we knew the rejected package only from its marketing info and seveal positive reviews. But modifying code with a function that does "something", and lots of code remarks about "something", is not very viable.
We have a number of developers using RPG on iSeries machines. Our company is going to the cloud and really wants to get rid of the iSeries ... and those developers. What should they be doing to prepare for a new job. My thought is they should be studying SQL (SQL Server or maybe Oracle) and NoSQL (maybe Mongo) so that they can leverage what they know to more current technology. They might want to get familiar with My SQL and PostGRE in the context of AWS. Are there any suggestions you could offer? Somehow I ended up on the group that is supposed to advise them.
Last Visit: 31-Dec-99 19:00 Last Update: 1-Mar-21 19:33