News for hackers. Stuff that matters.
Re:Donald Trump’s Contract with the American Voter [pdf] by burgreblast on Thursday November 10, 2016 @03:30AM (#12918683)
How do you guys deal with re-factoring code? Imagine a codebase that has been largely additive for 100 years.

While the "+1 minus two guideline" has plenty of shortcomings in the long term, there is lots of low hanging fruit now, and it's an important mindset shift.

Guys, don't just add LOC. Refactor, clean it up and make it better. Remove blocks we don't use anymore.

Re:Donald Trump’s Contract with the American Voter [pdf] by onion2k on Thursday November 10, 2016 @03:43AM (#12918737)
Government is strongly limited by time. There's a hard ceiling on the amount of things that can be proposed, debated, and voted on within a term. Consequently, if there are things in the statute that are no longer used it's often better to simply ignore them than to spend precious time in the house arguing about removing them. It might only take 5 minutes to call the house to order, have someone stand up and say "We don't need a law banning witchcraft any more" and then have a vote where the result is a foregone conclusion, that's 5 minutes that the government isn't doing something useful that will actually impact people's lives.

The repeal of pointless old laws comes up relatively often here in the UK. Some of our laws are really old - the government was talking about repealing some that were passed almost 750 years ago recently http://www.bbc.co.uk/news/uk-politics-30334812

Re:Donald Trump’s Contract with the American Voter [pdf] by syshum on Thursday November 10, 2016 @05:40AM (#12919279)
>>>Government is strongly limited by time. There's a hard ceiling on the amount of things that can be proposed, debated, and voted on within a term. Consequently, if there are things in the statute that are no longer used it's often better to simply ignore them than to spend precious time in the house arguing about removing them.

That is exactly why all laws should have sunset rules built into them.

We should have listened to Thomas Jefferson who wanted all laws, even the constitution itself to expire every 19 years

Re:Donald Trump’s Contract with the American Voter [pdf] by abjx on Thursday November 10, 2016 @09:46AM (#12920750)
It's a really terrible thing to have laws that aren't respected by the people, the government or the courts. It completely undermines the rule of law.
Re:Donald Trump’s Contract with the American Voter [pdf] by diggernet on Thursday November 10, 2016 @09:55AM (#12920828)
There's an argument to be made that there might be some benefit in government spending a little less time impacting people's lives.

But also, spending that time cleaning up old laws sounds an awful lot like "doing something useful that will actually impact people's lives".

Re:Donald Trump’s Contract with the American Voter [pdf] by dredmorbius on Thursday November 10, 2016 @05:28AM (#12919227)
Sounds like a garbage-collection problem. Some algorithms are more efficient than others.
Re:Donald Trump’s Contract with the American Voter [pdf] by dagw on Thursday November 10, 2016 @04:28AM (#12918935)
How do you guys deal with re-factoring code?

As a very rough guide. Replacing one big function with two smaller functions is often better than replacing two small functions with one big one.

Re:Donald Trump’s Contract with the American Voter [pdf] by mixedCase on Thursday November 10, 2016 @08:55AM (#12920339)
This is for functions that actually have a meaningful purpose and merit being better understood.
Re:Donald Trump’s Contract with the American Voter [pdf] by jamespo on Thursday November 10, 2016 @04:55AM (#12919079)
spot on
Re:Donald Trump’s Contract with the American Voter [pdf] by zby on Thursday November 10, 2016 @05:07AM (#12919130)
I think we programmers are ahead here - the general public needs sometime to think this over. The "+1 - 2" rule looks like a good start for opening the discussion.