Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×

Comment Re:We have the same... (Score 1) 689

There is a damn good reason to take a Siesta in the desert it's literally too hot to work so the go take a nap and then work late. I'm sure this doesn't apply to all of Mexico but it's known for a reason and it's practiced for a good reason. It has nothing to do with how hard they work.

Once assimilated you'll find a lot of the second or third generations being just as lazy as any other native.

Comment Re:Hello, economics (Score 1) 223

I would like to see a feasibility analysis done of a small scale research manufacturing module for the ISS with provisions for harvesting space debris for raw materials. If this worked out one might be able to bootstrap the enterprise with lesser inputs from Earth possibly making the project feasible. The research done in said module would likely have impact on earth manufacturing.

Comment Re:Terrible, Terrible, Headline (Score 1) 154

You cannot prove that parallel lines do not intersect purely by using geometry. You cannot prove 1+1=2 using math. The former is treated as an axiom, a statement that is intuitively assumed to be true in further proofs. The latter is a definition of terms - given what 1, 2, addition and equality are defined as, the statement is true.

The former is not treated as an axiom it is an axiom and as such it cannot be proven in any system. The latter can indeed be proven if you step outside of the bounds of algebra (which is a field of mathematics that covers addition) and into the bounds of set theory where we have a definition for 1 and a definition for 2 and a definition for the process of addition and using those three definitions we can indeed prove that 1 + 1 = 2. In algebra we would define the addition of our system such that 1 + 1 = 2 at which point it is treated as an axiom. To be clear there are systems where 1 + 1 != 2 (boolean algebra) but we can assume you knew that and were specifically discussing integer arithmetic.

Comment Re:Remember (Score 1) 633

At least in the USA utility companies while often technically not public are basically public entities and denying citizens a right to electricity (in the USA it's actually mandatory for the most part) would probably violate their charter. Now I understand that the GP may be from a different country with different laws but here at least that would be a violation of basic liberties.

Comment Re:Not surprising... (Score 1) 78

Just an addition a book is typically on the order of tens of thousands of sentences why on earth would I remember a single sentence? Hell to remember the specific sentence that they chose to use would be a 1/10000 chance without perfect eidetic memory. So many things wrong with even thinking of this study it makes my brain want to explode.

Comment Re:Different subjects (Score 1) 78

Well I was going to post almost exactly this but I couldn't have worded it as well. I have hundreds of books in my brain but I don't remember a single sentence from most of them but I could usually give you a meaningful summary just from the name of the book (series excluded they tend to blend into a single summary to me).

Comment Re:Tell him to write goddamn login page himself? (Score 1) 507

As for "Save data ... set...", that's an excellent example of what I could consider a bad comment, even if the code still agreed with it. If the saving process involves several lines then sure "Save data..." might make a good section header, but "set..." is going into exactly the wrong kind of detail - it's the sort of thing that's hopefully apparent from reading the code, is prone to change with the implementation details, and tells you absolutely nothing about *why* it is being marked dirty in the first place, which depending on context may be non-obvious information.

I might have a better impression of comments if I had ever seen a good one but the code base I work in now is clean enough that they're often unnecessary but conspicuously absent when needed.

Comment Re:Tell him to write goddamn login page himself? (Score 1) 507

You go ahead and just read the code then - I can read five words a LOT faster than five lines of code, and the code only tells you *what* is being done, not *why*. A brief statement of intent can save you a lot of work reverse-engineering the code to extract it's purpose.

I find about 20-30 lines of code per function/method to be about right with descriptive naming you can gather the why from the context and the how from the code. It also allows you to skim the code for function names which if properly descriptive can be guessed at least approximately without prior knowledge. If your code goes above that 20-30 lines (for a good reason they do exist) then comments become more useful as delimiters. I am quite sure there are times my advice is not applicable but for most cases (50% + some epsilon > 0) refactoring would be the better option.

Ugly code is still obviously where most of the comments live, precisely because you (err, I mean the *next* guy, obviously) probably will need help understanding *what* is being done. For the same reason those comments tend to be the least helpful over time unless everyone who modifies the code is really anal about updating the comments to reflect their code changes.

Sad fact is that every time I've wanted to see a comment in code there wasn't one and almost every comment I've ever seen in code referred to code that was no longer there or was in fact wrong (Save data to database set isDirty flag to true WTF???).

Slashdot Top Deals

Any circuit design must contain at least one part which is obsolete, two parts which are unobtainable, and three parts which are still under development.

Working...