Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment Productivity is inversely correlated with facebook (Score 2) 75

That sounds about right to me. People focused on productivity probably don't bother with facebook accounts or anything. It's too big a waste of time. I also turned off email notifications and I leave my phone on airplane mode most of the time. Interruptions are a real time waster.

Comment I use it every day, but still use imperative too (Score 1) 400

I maintain a large-ish enterprisey system, most of which is written in C#. I use the functional features of C# every day. However, I would caution you against lumping all functional features under a single heading of "functional programming" because you can look at each feature independently and decide whether you want to use it.

For me, I definitely use immutability, both in combination with dependency injection for my service classes, but also in many of my data structures. For instance, I might have a module that pulls a bunch of state from the database and then organizes it into a projection, such as a forecast of material usage. That forecast is immutable. I then (optionally) have the ability to cache that either locally in the program, or cache it to the database, but when I bring it back it's still immutable, so that data with that ID never changes, and none of the consumers of that data need to worry about it changing. In some cases that means I can safely split the further processing of that data across multiple threads rather easily.

Also, LINQ is really just a ripoff of Lisp's S-expressions, and I find it extremely useful. If I have a list of anything, and I need to manipulate it into another form, then LINQ allows me to do that without loops and with less complexity. I generally still use loops for modifying data.

LINQ is really a combination of three features: 1) functions as first-class citizens, 2) lambda expressions/syntax, and 3) closures. These are very useful on their own. Being able to take a function as an argument is extremely powerful, and being able to define a function inline when you call that method, and have it capture values from outside that function in the form of a closure -- very powerful.

That doesn't mean there isn't a use for imperative programming, but when I see a colleague filtering a list of objects with a foreach loop, I just cringe. Just use a .Where() clause! Don't be afraid of functional - use it as one more weapon in your arsenal.

Comment Re:American problem is American (Score 1) 437

When people say "electricity is expensive" I usually say, "compared to what?" Consider that "a healthy well-fed laborer over the course of an 8-hour work shift can sustain an average output of about 75 watts." Source. Over the span of 8 hours, that amounts to 8 * 0.075 = 0.6 kWh. NPR in 2011 (via Google) says the "average price people in the U.S. pay for electricity is about 12 cents per kilowatt-hour." So you can buy 8 hours of human power for a few cents in the form of electricity from the grid. I'm not saying we shouldn't hang our clothes to dry, but I'm saying we shouldn't do that until we have a robot that can do it for us.

Comment Re:American problem is American (Score 4, Insightful) 437

If you make $50,000 a year at a 2000 hour per year job, you make $25 per hour, and let's say after tax that's... maybe $18 an hour. That's somewhat typical. I'll be generous and say it only takes you an extra 10 minutes to hang a load and go get it off the line later. That's a sixth of an hour, which should be worth $3 to you in after-tax income. I happen to have an energy monitor installed at my panel, and I can tell you that it takes less than 25 cents of electricity to dry a load. Obviously this varies by where you live, but it's certainly going to be less than $1. Much less than that if you use a gas dryer. We do at least 4 loads a week, typically 5 as we're a family of 5, so that's a savings of around $10 per week, so over $500 per year in time savings. My electric dryer is over 15 years old and it's a very basic two-cycle with moisture sensor type, so probably cost less than $500 new. I think it's a no-brainer to use a clothes dryer.

Comment Re:Common Sense calling - Women have babies (Score 2) 238

I live in Canada and I'm male, and when my first kid was born, I told my boss I was thinking of taking time off (6 months). My co-workers suggested this was a bad idea, and my boss (female) said when she'd had her first child, she was working from the hospital and back at work the next week. My wife's employment plans fell through so we decided it wasn't feasible for me to take time off, but it was pretty clear that I was strongly discouraged from doing so. Also, in my current job with maybe 150 employees at this company, I can't give you one instance of a male taking significant time off for a new child. In fact if one of the men takes even a week off, people make comments about it. That's on top of some females here saying, "I'd never let my husband take *my* parental leave." Trust me, Canada still has a ways to go.

Comment Re:Don't be stupid... (Score 1) 620

That completely ignores the tragedy of the commons. Ten people live around a lake. One guy dumps toxic pollution in the lake and kills all the fish. It doesn't matter how hard the other 9 try to clean up the lake, they'll never keep up with the one guy spewing toxic waste. I suppose they could pay him to not do it, but I don't see why he actually has a right to dump toxic waste in the lake in the first place. Likely they'll just gang up on him and make him stop. Same with carbon emissions... assuming everyone has a right to breath in oxygen and breath out carbon dioxide, the total amount being put into the atmosphere is much more than that basic allowance. What gives a few people/companies/nations the right to dump far more than their allotment into the atmosphere? Why should others pay them not to do it? It's a common resource, and has to be managed by agreement, and if we disagree too much, there will be violence to settle it. It's the same as if someone took all the food and didn't leave any for anyone else.

Comment Pathetic (Score 5, Insightful) 281

In my Grandparents' generation, the recruiting posters said, "your country needs you" and people signed up to fight in a *war* to protect their families and communities, and many of those people didn't come back. Now we simply ask that you get a couple tiny jabs to protect your family and community from some of the most terrible diseases imaginable, and people think there's too much risk. Yes, there's a *tiny* risk, but you still choose to drive little Johnny all over town to soccer practices and birthday parties, putting your precious cargo at far higher risk of death from a car accident than any risk from the vaccine, and then there's the fact that your child is now much more likely to get those diseases. It's literally ridiculous.

Comment Depends what the user wants vs. needs, I guess (Score 1) 429

Maybe we think the user *needs* to find the truth, but maybe they *want* to find an article that makes them feel good about their hatred. Isn't Google supposed to help them find what they want? Of course, some kid could just as easily be typing that because they really don't know and want to understand what the deal is.

Comment Re:Come on, not that "Terminator" BS again... (Score 1) 407

Yes, there are a number of things that could have gone wrong here, but it's not evident that she bypassed or ignored any safety protocol. There's a chance that the system integrator designed and implemented it wrong, and that the safety inspection missed it, though since it's Michigan I'd suspect it's a case of nobody doing a safety inspection (government has to cut regulation to be friendly to businesses after all). So sure, she might have gone in and had someone close the door behind her and reset it, or the integrator might have botched the safety interlocks between the two cells. There's the chance that someone in maintenance deliberately bypassed the inter-cell safety interlocks, and then there's the (very remote) chance that one of the category 4 certified safety devices failed in an undetected state, which they're specifically designed not to do. This is something the professional engineering organization in Michigan needs to be investigating and publishing a report on so we can all understand what happened, and see if there's ways to prevent it from happening again.

Comment Re:Excellent (Score 1) 352

Yes, if the only reason you have to do everything in GMT is because of DST, then for goodness sakes we need to get rid of DST because it costs time to be converting back and forth all the time. My users say, "I think there's something wrong in the logs yesterday at 3." Now if I'm looking at the raw data in GMT, I have to do some kind of conversion first to figure out what I'm looking for. It's needless, takes extra time, and creates an opportunity for errors.

Comment Excellent (Score 2) 352

So can we just get rid of it then? I maintain a few data logging systems, and it creates all kinds of problems, as I'm sure you're aware most people want to view data in local time, but not only is there a 1 hour gap in the data in the spring, but there's actually going to be two points in time that are equally valid 1:30 am November 5th, 2017. That's just stupid.

Comment I think the real question is... (Score 1) 62

How much did "Alex Hern, writing for The Guardian" get paid by Snapchat to write that story? Companies copy features all the time, and certainly have done so in the field of software forever. I'm certainly no fan of Facebook, and deleted my account long ago, but why shouldn't Facebook do it? Wouldn't they be stupid not to add features their users might like? Is there only one car company making cars with intermittent wipers?

Comment Re:Redundant (Score 2) 141

I'm not sure why some people have such a huge problem with spam. I use a service where I make up a unique email address for each account I sign up for. That (paid, but cheap) service forwards the mail to me. If I ever get unsolicited email on that address, I go to the service and delete the address, or if I really care, I make a new one and update that account, because they probably got hacked.

When an account sends me a mailing list, I click the unsubscribe button, and I would say 9 times out of 10 that works. If it doesn't, I delete or disable that email address.

Which means I don't have a spam problem.

Comment You don't have to ask "trick" questions (Score 1) 1001

I always ask technical questions, but never "trick" questions or really hard ones. If you ask a FizzBuzz-like question, there's no reason anyone needs reference material and it separates most of the fluff that apply for programming jobs right away. There's no way I'd ask for a bubble sort or a binary-heap-blah-blah-blah because I wouldn't be able to answer it. But you *must* ask technical questions in an interview.

Slashdot Top Deals

"Only the hypocrite is really rotten to the core." -- Hannah Arendt.

Working...