Slashdot Mirror


User: swillden

swillden's activity in the archive.

Stories
0
Comments
18,006
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 18,006

  1. Re:One line st a time... on Ask Slashdot: How Do You Read Code? · · Score: 1

    Yep, it's a new thing since about 1994.

  2. Re:One line st a time... on Ask Slashdot: How Do You Read Code? · · Score: 1

    BTDT,

    OTOH,

    Bee Tee Dee Tee? Oh Tee Oh Atche?

    http://lmgtfy.com/?q=BTDT

    http://lmgtfy.com/?q=OTOH

  3. Re:One line st a time... on Ask Slashdot: How Do You Read Code? · · Score: 1

    Given that this asshole works for Google, this post is probably an ad, but we'll have to wait for another post to find out exactly what for...

    LOL.

    You must have too much time on your hands.

  4. Re:One line st a time... on Ask Slashdot: How Do You Read Code? · · Score: 1

    Most of the comments I add to code these days is WHY something is being done. For me at least it's usually clear enough to see WHAT the code does, but WHY is confusing.

    That's legitimate... but often the "why" can be encoded into variable and function names.

    'Following calculation per request of helpdesk ticket #23938'

    Links to external context are excellent reasons for adding comments.

  5. Re:WTF Are you Serious? on Ask Slashdot: How Do You Read Code? · · Score: 1

    What is being looped over is defined by the block of code after the for specifically by how the loop index is used.

    I should have mentioned that the scan of the code block must also look for any computations on or adjustments to the loop index. This is one of the big wins of range-based loops, BTW (e.g. "for (auto& entry : collection)"). They greatly enhance readability by excluding the possibility at the outset that this is anything but a straightforward iteration, meaning the reader doesn't have to look for any weirdness. You still have to check for breaks and returns, though.

    Also, I have to say that if you commonly write loops that do funny things with the loop index, you should stop that. It's the sort of code that often contains subtle bugs and is always harder to read than it could be. There are cases where it's the best option, but you should always look really hard for an alternative before writing such a thing. Maintainers will appreciate your extra effort.

  6. Re:Can I ride drunk? on The Audi A8: First Production Car To Achieve Level 3 Autonomy (ieee.org) · · Score: 1

    Google is trialling level 4 vehicles in Phoenix. Vans that pick kids up and run them to soccer practice without a human driver in the car at all.

  7. Re: WTF Are you Serious? on Ask Slashdot: How Do You Read Code? · · Score: 1

    Not all loops are the same. Noticing the differences is crucial.

  8. Re:Can I ride drunk? on The Audi A8: First Production Car To Achieve Level 3 Autonomy (ieee.org) · · Score: 2

    If you are reading a newspaper as they suggest, it might take you several seconds to finish the paragraph

    Or if you're asleep, it might take you 30 seconds to figure out where you are and what's going on. I think this is a big deficiency in the definition of level 3, and one of the reasons I'm skeptical of level 3 systems. Tesla's level 2.5 is even worse... though they do have some pretty compelling data showing that their system, deficient though it might be, reduces accidents as compared with human drivers. A system doesn't actually have to be good to be viable, it just has to be better than people, and people suck.

    We really just need to get to level 4. That was Google's conclusion early on, and the focus on achieving complete autonomy for highway and city driving is what has held them back from releasing a product. Time will tell on whether that was a good decision, but it seems clear to me that it's the most safety-conscious decision.

  9. Re:Can I ride drunk? on The Audi A8: First Production Car To Achieve Level 3 Autonomy (ieee.org) · · Score: 5, Informative

    Does level 3 mean I can have it take me home while drunk, or will I still get a DWI?

    Nope.

    At level 3 a competent driver is still needed. In conditions the car can handle, the driver can ignore what's going on, relying on the car to tell the driver when to pay attention take over, but the car may decide that at any time and you have to be competent.

    At level 4 you could have it take you home while drunk, as long as the entire route is within the car's capabilities.

    At level 5 the car is as good as a human driver in every possible driving scenario, including dirt roads, etc.

  10. Re:Of course, the utility is limited when... on The Audi A8: First Production Car To Achieve Level 3 Autonomy (ieee.org) · · Score: 3, Interesting

    Because you HAVE to have a manual transmission if you're a real driver.

    Up until the most modern DSG's this was a very true statement, automatics meant significant performance sacrifices where a real driver would considerably outperform the auto.

    True for cars, but not for pickup trucks (big trucks with huge numbers of gears are a different story). There are significant advantages to having a torque converter over a clutch when starting a heavy load. As a result, pickups with automatic transmissions have higher rated towing capacities than the same model with a manual transmission. There are also a lot of advantages for off-road vehicles, where drivers may need to apply very precise amounts of power from a standing start and at low speeds.

  11. Re:One line st a time... on Ask Slashdot: How Do You Read Code? · · Score: 3, Insightful

    BTDT, more times than I could possibly remember.

    OTOH, I'm proud to say that there have been a number of times in the last few years (of a 30 year career) that I've looked at something and thought "Damn, this is really clean and elegant, and that bit is incredibly clever in its simplicity"... and then realized that was my code. And I've had co-workers compliment me on the simplicity and clarity of my code. That is an awesome feeling.

    On the gripping hand, I would *not* say that of the project I've been working on for the last three years. It started out fairly decent (not great, but good, IMO), but has gotten very crufty and at this point is pretty hard to follow. It really needs a major refactor. If I only had a quarter to spend on cleanup... but new requirements come in too fast.

    Writing working code is easy. Writing readable code is much, much harder. Worth the effort, though.

    Here's a tip: Once you have developed enough as a programmer to have a good sense of what's clear enough to be readable to another programmer (i.e. yourself in three months) and what isn't, enough that you know when you need to add explanatory comments to clarify how bits of the code do their job, then you should start treating inline comments as a code smell. If the code can't stand on its own, refactor until it can. Often this is as simple as picking some better variable or function names, or pulling apart a calculation so you can assign parts of it to well-named variables, or factoring a block of code out into a separate method so you can give it a descriptive name. Other times, after doing all of that it's still not good and you need to do a deeper refactor. But don't be satisfied until the code can stand alone, comment-free, and still be clear, concise and straightforward. There are some cases in which this is impossible, but I think they are rare.

  12. Re:WTF Are you Serious? on Ask Slashdot: How Do You Read Code? · · Score: 1

    What competent programmer converts the abstraction of code to ENGLISH to grok it?

    None so far.

    No it doesn't. It translates to, "Iterate 'itemlist'" , You're Welcome.

    "loop"

    It's a little more than just "loop"; closer to "iterate itemlist" (assuming it's translated into words at all). It's important to note what is being looped over. In addition, when I read a for statement, I not only note what's being looped over but examine the pieces of the construct to see if anything unusual is being done. In the example above, a quick scan would confirm that it's a bog-standard iteration over the entire collection... unless there's a break or early return, so my eyes would next flick down to scan for one. I don't start reading the body in earnest until I know exactly what is being iterated over, and how much of it.

  13. Unlike alcohol, I don't want gaming out of my life. I just need a healthier relationship with it where I game when I want to, not because I don't want to do anything at all and that is the easiest way to pass time.

    +1000. I don't want anyone to think that I mean video games are bad. I like 'em myself. But it's appropriate to call them a Skinner's box, and they are addictive in the same way, and for much the same reasons, that gambling is. Gambling can also be great entertainment... if you can approach it the right way, in moderation and as part of an overall healthy lifestyle. But it can be hard not to get sucked in. And gambling is obviously much more destructive than gaming. Excessive gaming deprives you of economic and other opportunities while excessive gambling destroys you financially.

    I hope your teenager figures his shit out so he doesn't have these regrets.

    He's 20 now, so not a teenager. But, yeah, I really hope he figures it out, too. And he's going to have to do it pretty quickly because we're not supporting someone else's kid indefinitely. We aren't willing to support our own kids indefinitely.

  14. You didn't read the post you responded to. You got halfway through and quit.

  15. Re:Says a Leftist... on Seattle City Council Unanimously Approves Income Tax For the Rich (geekwire.com) · · Score: 1

    The problem with socialism is eventually you run out of other people's money. -Margaret Thatcher

    Sweden's debt to GDP ratio is 43.9%, down from 67% 20 years ago.. The United States' ratio is 118.9%, up from 62% 20 years ago.

    So, Sweden clearly is not running out of other people's money. Now, perhaps there are other reasons for their situation; I can't remotely pretend to have done an in-depth analysis. Hell, I wouldn't even know where to start, I'm not an economist. But on the face of it, the numbers show Mrs. Thatcher to be wrong.

    Again I'll reiterate that I'm not claiming that socialism, in its modern form, is better than something closer to capitalism. The "purest" forms of socialism clearly don't work on anything but a very, very small scale; production falls to nothing and life is hell for everyone except those in charge of enforcing ideological purity. The purest forms of capitalism produce better outcomes overall, but at the expense of heinous conditions for those at the very bottom. So we've already pretty much settled that the right answer is something between those extremes. Exactly where is hard to say... and as I said previously I suspect that the right balance is different for different cultures.

  16. Re:He must be ugly on Tech Boss Attacks 'Whiners' in Angry Email (bbc.com) · · Score: 1

    That fact that there were very few justified payouts has nothing to do with...

    That's your allegation that women are "getting paydays" from supposedly justified complaints.

    Nice misattribution. That was ShanghaiBill's comment, not mine. And he was wrong to say that... but the fact that he flubbed his response to the original claim that there are many women who've received unjustified payouts doesn't change the fact that that was the original claim.

    Like you said, it's on the claimant to support their claim.

    So, let's see some support for it. Though it was an AC that made the claim, not you, so it's really not on you to support it... unless you also are making the claim. Which your comment appears to imply. Are you?

    Read the rest of my comment for my thoughts on which of you is right, and why.

    Okay, let's take a look at what you claimed:

    a woman seeking a payday is more likely to pursue legal avenues even after the alleged harassment has been dealt with so you will find many more instances of that if you actually look

    There's a claim. Can you support it?

    two reasonable people never sit opposite each other in a courtroom.

    Never is an awfully strong claim, and a particularly hard one to support. Actually, it's plainly false, even without seeking specific counterexamples, because there's an obvious class of cases where it's false: any situation where the facts of the matter are in dispute can have entirely reasonable people on opposite sides.

  17. Re:Many men feel emboldened now that Trump on Tech Boss Attacks 'Whiners' in Angry Email (bbc.com) · · Score: 0

    When even an innocuous appreciative but not lecherly comment comment like "nice dress" on the one day a co-worker wears something particularly attractive is deemed sexual harassment, the movement has gone too far.

    Whether that's harassment depends. Do you also compliment your male co-workers when they dress nicely? If your female co-worker indicates that she's uncomfortable with the compliment (even non-verbally), do you stop saying such things?

    If the answers to either of those questions is "no", then yes, it's harassment, and that has nothing to do with any "movement".

  18. Re:He must be ugly on Tech Boss Attacks 'Whiners' in Angry Email (bbc.com) · · Score: 1

    I didn't say you had to act immediately. I said if you ignored it you would suffer bodily harm.

    You shouldn't ignore it. You should recognize it for what it is and take care not to act on it. This includes watching your own behavior to ensure that you don't stare or do anything else "creepy". Don't pay either excessive or insufficient attention, don't either highlight or in appropriately ignore the target of your attraction's gender. In short, work hard to behave exactly as you would if you were not attracted.

    If you need sexual release, by all means seek it out, just don't do it at work. If you don't have a social life outside of work, either because you spend too much time at work or because you're a couch potato in your off time, then focus on fixing that.

    If you're really attracted to one particular co-worker, and if company policy and your roles don't make a relationship impossible, then you can pursue her... but only outside of work. This means you first have to find a way to see her in a non-work context, without stalking or some other creepiness. That essentially means you have to start with a very careful suggestion for non-work personal interaction that is clearly not a date, and to be completely prepared to accept "no" for an answer, and to consider it final. Note that business trips are work interactions, beginning to end. Once outside of the work context, you can test the waters for the possibility of a date. Again, fully prepared to accept "no" and to consider it final and binding. From there you can proceed, but with only with a focus on avoiding any spillover into the work environment. That doesn't mean you should keep it a secret; quite the opposite, because secrets get found out and promote suspicion.

    If all of that sounds really hard, it's because it is. You're really better off doing your romantic socializing away from the workplace entirely.

  19. Re:He must be ugly on Tech Boss Attacks 'Whiners' in Angry Email (bbc.com) · · Score: 2

    That's why the very best policy is not to have affairs with subordinates, and it's why most modern policies either outright ban such relationships, or require that the subordinate move into another department so that they are no longer under the manager's direct supervision.

    I think there's a less draconian option available, which I've seen be effective at several companies.

    The policy should be to require that superiors who engage in a personal, and especially sexual, relationship with any subordinate have to report the relationship to HR. Though that's all that needs to be published in the employee handbook, HR policy should then be to take something like the following actions:

    1. Establish a specific reporting channel for allegations of favoritism by the superior.
    2. Inform the couple that any allegations of favoritism will be assumed to be true, unless proven otherwise, and that while this is guilty-until-proven-innocent policy is perhaps unfair it's a cost of having such a relationship. Also, that any HR action taken in response to allegations will fall on both, but primarily on the superior.
    3. Make clear that in the event of a breakup, it will be the responsibility of the couple to maintain a good working relationship, and that any allegation of negative impact on the workplace will be similarly assumed to be true.
    4. Make clear that any promotion, bonus, etc. for the subordinate must be approved by another manager and with oversight from HR.
    5. Have the superior inform all of their other subordinates of the relationship, the expected non-impact on workplace dynamics, the additional career oversight, and the reporting channel to be used if any problems are noted, with explicit instruction that there is no need to discuss any concerns with the superior first, and that it's wholly appropriate to take them directly to HR. This meeting must be attended by HR.

    Faced with this situation, most couples opt to have one of them change jobs, but I have seen several who made it work, at least while they were together. It only works when the superior is already seen as fair, trustworthy and mature by their subordinates, and when the subordinates are also capable of professionalism. I've never seen it sustained effectively after a breakup; always one or the other changes jobs.

  20. Re:He must be ugly on Tech Boss Attacks 'Whiners' in Angry Email (bbc.com) · · Score: 2

    Your zero examples say otherwise.

    So do yours.

    Nonsense. So far what we have is zero evidence of any women getting paydays from allegation complaints, justifiable or not. Against that we have allegations that there are lots of unjustified paydays. It's on the maker of the claim to support it, not on the objectors to disprove it.

  21. If there are genres where some adequately competent musicians banging together a work for hire are considered by listeners to be an acceptable substitute for "real" artists; and can be used for 95 years for whatever one-time payment got them into the studio; well, really, really, sucks to be an artist in that genre.

    Nonsense.

    There's nothing at all "sucky" about working in a field where you can get a decent day's pay for a day's work, and do it steadily. What sucks is the rest of the music industry, where artists have a miniscule chance of becoming ludicrously wealthy and (1 - miniscule) probability of starving for years reaching for a golden ring that they'll never achieve.

    It's a poorly-kept secret in the LA music scene that one of the best jobs you can get is as a session musician that is regularly hired by labels to back up their "names", or to sweeten recorded tracks. They don't have five houses with gold-plated toilet seats, but they make a very comfortable living working two to three days per week making music which is heard by millions. Sure, their names are in small print on dustcovers (if at all), but they have great lives doing what they love. I met a few of these guys when I contracted for UMG and they were very happy that they got paid on a strict fee for service basis rather than being at the mercy of royalties and recoupments. Many of them had been asked to join various bands they've backed up, and refused.

  22. Re:Says a Leftist... on Seattle City Council Unanimously Approves Income Tax For the Rich (geekwire.com) · · Score: 5, Informative

    Because the sure fire way to up your standard of living is under Socialism right?

    I don't know that it's clear which is ultimately better; the modern form of socialism (which is capitalism with a strong safety net funded by heavy taxation), or something closer to pure capitalism (pure capitalism exists nowhere). My suspicion is that both approaches work, but which will work in a given country depends on the local culture.

    Talk to a Fin, German, or Swede about their great economic mobility opportunities. (real people, not fabricated media reports).

    That's stupid. If you want to know about such things, you don't seek out anecdotes, which may tell you very different things depending on whom you encounter, you look for data. Common measures of economic mobility put Swedes, to pick one country, far above Americans. Some more recent research questions those measures which focus only on single-generation changes and look at multi-generational mobility. By those measures, Swedes have roughly the same level of economic mobility as Americans. I don't see any data that indicates they have less mobility than Americans.

    That said, I strongly suspect that a regional analysis of the US would yield a different result, because we know very well that mobility varies greatly across different regions of the country. https://www.theatlantic.com/bu.... Perhaps people in Salt Lake City (per that 2014 study, the city with highest upward mobility for moving into the middle class) or San Jose (the city with the highest upward mobility for moving into the top quintile) are significantly more upwardly mobile that people in Stockholm (or whatever Swedish city has the highest mobility). I haven't found any studies that apply the same measurement techniques to make comparison feasible (and even then such things are tricky). But, as a nation, the US is no more mobile than Sweden, and probably somewhat less, which means that extensive safety nets don't kill mobility, and their absence doesn't guarantee it.

  23. Re:$250K is the definition of the evil 1% on Seattle City Council Unanimously Approves Income Tax For the Rich (geekwire.com) · · Score: 5, Informative

    *Most* americans live paycheck to paycheck and are vastly in debt

    This is true, but except at the very bottom it has almost nothing to do with income. Plenty of people making >$250K also live paycheck to paycheck and are vastly in debt. Whether or not you're living at the edge of your finances has much less to do with how much money you earn than it does how you spend. I know families of six that live on $25K annually and have money in the bank and no debt other than the mortgage on their (old and very small) house. I know DINKs that have combined incomes of $400K annually but every cent is pre-spent, and any unexpected expenses go on credit cards. There's a *huge* difference in the way those people live; the difference is larger than $375K per year, because the former live below their meager means while the latter live above their ample means.

    Being rich or poor is somewhat determined by choices and effort, but mostly determined by luck. Living paycheck to paycheck, however, is almost always due to choices. Note that I said "almost", because there are exceptions; cases where people who do live below their means get slammed with some impossible expense (e.g. medical expenses) which sucks up their savings and leaves them with unmanageable payments, perhaps garnished from their wages. There are also people who live on disability income which will evaporate if they save any money (stupid, stupid policy). But *most* Americans who live paycheck to paycheck do it by choice, though few of them believe it. But have them sit down with a decent financial planner who will help them identify where their money goes, optimize it (which may involve moving, since many are house-poor), and create a budget that enables them to save, and they can stop living that way.

    Personally, I used to live paycheck to paycheck, on a $100K income, until I realized that I was being stupid and took control. Granted that it's a lot easier to take control of your finances with $100K income than with $25K income but it's totally possible for the vast majority even at the bottom end of that range. There is a point below which living just about becomes impossible, of course.

  24. Re:The first distro still leads by a large margin on Survey Finds Most Popular Linux Laptop Distros: Ubuntu and Arch (phoronix.com) · · Score: 1

    Why would you mix in openSUSE with Fedora and CentOS? they're not in the same family. the only common link is RPM, but they don't share code or history, just a package manager.

    It's been a while since I uses SuSE (since before it acquired the "Open"), but it always felt like it had a lot in common with RH. I think SuSE largely followed RedHat's lead in the way they modularized the system, in ways beyond those driven by the operation of the package manager. Obviously, SuSE was a KDE distro from the beginning, while RH was GNOME, but the differences always seemed pretty shallow.

  25. Re:The first distro still leads by a large margin on Survey Finds Most Popular Linux Laptop Distros: Ubuntu and Arch (phoronix.com) · · Score: 1

    Given that this asshole works for Google, I'd consider this posting an ad...

    So... what is it that I'm advertising?