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) 78

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) 415

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) 440

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) 440

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:Project lacks focus. (Score 1) 191

The same MS which just released a massive update to its linux subsystem in Windows, incorporating all sorts of improvements, in order to appeal to the self same power users you mention?

I get that you don't like MS. I really do. There is a lot to criticise them for without resorting to making stuff up.

Comment Re: Nobody (Score 2) 236

Hardware acceleration is definitely up to the browser, and that has a huge impact on battery life and video performance. On my shitty AMD APU machine, Chrome chokes when playing video in the browser. For some reason Edge plays them with full hardware acceleration, removing the tearing and stuttering present in Chrome - with the same video. It's not as simple as you seem to assume it is...

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.

Slashdot Top Deals

In order to dial out, it is necessary to broaden one's dimension.

Working...