Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Submission + - Recursion - Love it or Hate It?

theodp writes: "Yet another example of how AP exams are loaded with poor coding practices," quipped Alfred Thompson, referring to a recursive code example that prints the numbers 0 to 6, which was posted to the (closed) AP Computer Science Facebook group. "We are often forced to use code examples that are not ideal coding practice," Thompson notes. "We do that to make things clear and to demonstrate specific concepts in a sort of isolation that we might not normally use. We seem to do that a lot with recursion because the examples that require recursion tend to be fairly complex." So, while asking students to use recursion instead of a loop to print '0123456' serves the purpose of teaching recursion, Thompson opines that it's also a poor example of code practice. "Someone raised on functional programming where recursion is a pretty standard way of doing looping might disagree of course," he adds. "There is a saying that when all you have is a hammer all your problems look like nails. This seems, in a way, to be the case with recursion and loops. If your first tool of choice (or what you have learned first) for iteration is loops you tend not to think of recursion as a solution. Similarly if you start with recursion (as is common with functional programming) you are a lot more likely to look at recursion as a tool for iteration." So, do you tend to embrace or eschew recursion in your programming?

Submission + - Google Earth Pro Now Available Free

HughPickens.com writes: Google has long offered a Pro version of Google Earth for $399 per year that includes some pretty cool extras not found in the free version. Now Rick Broida reports at Cnet that you can get Google Earth Pro absolutely free. All you have to do is download the installer, run it, then sign in using your e-mail address (as your username) and license code GEPFREE. Features include: Advanced measurements: Measure parking lots and land developments with polygon area measure, or determine affected radius with circle measure; High-resolution printing: Print images up to 4,800 x 3,200 pixel resolution; Exclusive pro data layers with Demographics and traffic count; Spreadsheet import: Ingest up to 2,500 addresses at a time, assigning place marks and style templates in bulk; and Movie-Maker: Export Windows Media and QuickTime HD movies, up to 1,920x1,080-pixel resolution. If you’ve ever been involved in a property dispute, you’ll know how acrimonious they can get. Google Earth Pro includes parcel data that definitively defines property boundaries. "Do you really need this? Probably not, as Pro was created with business/enterprise users in mind," writes Broida. "Let's be honest, [Google Earth Pro has] entertainment value that's virtually impossible to measure."

Comment Re:It's so not fair (Score 1) 214

Republicans want a hearing to censure Obama for undo [sic] influence on creating Title II and doing this job as the president.

The FCC is supposed to be an independent executive branch agency. In theory, it doesn't exist to do the President's bidding. (When a Republican is in office, the press calls this an indicator of "The Imperial Presidency.") But when an "independent agency" comes up with rules that the President asks for in the press that help his cronies, the other party will raise this concern. This happens all the time.

Is not the president the chief executive of the executive branch of government? In essence he reports to Obama

Comment Re:It's so not fair (Score 1) 214

My point was to draw satire of those brainwashed by lobbyists and those who listen to people like Rush Limbaugh.

Since the poor evil government decided on this it is therefore socialism and an attack on freedom!

It is not logical or thought. Just government = bad. Do nothing = good. Socialism = government so therefore bad.

Which is why Republicans want a hearing to censure Obama for undo influence on creating Title II and doing this job as the president. It was him implementing evil communism according the Verizon, Comcast, and others and an ignorant base who believe whatever they say.

Comment Re: They should switch it to "devuan" (Score 1) 48

You are more than welcome to use systemd if you so choose. Don't expect everyone else to like it and use it just because you happen to.One of the biggest objections to systemd is that it's not just an init system. It's reached almost 300 thousand lines of code. That should give anyone pause for thought who considers it a replacement for init.

300k? That's it. Seriously.

While 200 lines for an init script is certainly possible that's not necessary. For example postgresql has a 58 line init script of which 14 lines are comments and 8 are white space. It also has almost 10 lines that contain one word. It's really pretty simple. If you can't understand it then you're probably not in position to be changing it even if you wanted to.

That is a lot of code for simplicistic arguments based on events in comparison. What happens if the database is compromised? What if an integrity issue pops up? With an event driven daemon you can put those cases in. You need whole programs in init to monitor and do all sorts of other hacks for equivalent functionality.

Ubuntu is being forced to adopt systemd in future versions because debian has done so.

No they are doing so as the market is favoring SystemD. Note I speak as a Solaris administrator who has actually used SMF. It has it perks but it's not all roses.

No it is more work but if you ask any web administrator who has worked with Apache and older versions of IIS then switched to nginx will tell you the pain in learning sucked temporarily but was worth it for speed, security, and now simplicity with an event driven framework.

What is Apple using for init that makes the Macbook Pro's at work boot so slow (off SSD) when compared to the Dell Lattitudes runing (non-systemd) Linux? Both types of machine have Core i5 CPUs and 8GB RAM...

heh captcha - "screwed"

No Apple switched because of scenarios like lets say your MacBook pro fell asleep at work and woke up in a hotel on a different network. Now what?? In the Linux world there are ugly bloated hacks like Network manager for such scenarios but lets say you want to customize this?

LaunchD is event driven like SystemD. You prre-program conditions and what to do. Much simplier. Yes it is faster too.

Remember in 1985 when init was finalized in SYS V a typically unix workstation had maybe 35 programs at the most and were simple things like Vi, awk, cat, etc. Init was simple to start it and run 1 service with no dependencies. That was what it was designed for. Not modern distros with +4000 apps, daemons, interdependence galore, and conditions that change.

It is 2015 and its time to get with the times. You are free to live in the past too if you like. But I am sick and tired of seeing all this fear of change and foaming at the mouth from people who made opinions based on trolls.

Comment Re: They should switch it to "devuan" (Score 1) 48

You mean you have to make a choice between a cell phone interface or an outdated half decade old no longer updated OS in the windows world? Or go mac and experience the dull, flat, and buggy Yosemite, broken Lion releases, or go back to the good old 2009 days of snow leopard?
L
Change for the sake of change iskilling the desktop. 2009 was when software was good for non linux. Some would argue 2003 and still use XP 64 bit and Office 2003 because it's menu driven

Submission + - The Man Squatting on Millions of Dollars Worth of Domain Names

Jason Koebler writes: For the last 21 years, Gary Millin and his colleagues at World Accelerator have been slowly accumulating a veritable treasure trove of seemingly premium generic domain names. For instance, Millin owns, has sold, or has bartered away world.com, usa.com, doctor.com, lawyer.com, comic.com, email.com, cyberservices.com, and more than 1,000 other domain names that can be yours (including yours.com, which he owns), as long as you've got the startup idea to back it up. Millin doesn't sell domain names anymore, instead, he trades them to startups in exchange for a stake in the company.

Comment Re:in other words, manufactured ailment. (Score 1) 201

Sometimes there are benefits and risks at the same time. The suppliers seek big profits and will always emphasise the benefits. It is not that black and white, and therefore not so easy to get a fraud judgement when suppliers skew the opinion of the people through large marketing budgets. The profits easily pay for a lot of influence.

Sometimes politics has to regulate, and especially neutralize the unwanted pressure from commerce. There are various means, such as diminishing the lobby influence over politicians, to having a strong public television system to counteract skewed information from commercial parties.

Submission + - Another 0 day exploit hitting Adobe Flash (arstechnica.com)

Billly Gates writes: Just a week or 2 ago another flash exploit hit the net installing CryptoWall through infected servers from ad networks. Now the scammers are using another 0 day exploit to hit any browser at any version to install malware or Cryptowall on a victims computer. A decade on Slashdot there were discussions on whether it was time to uninstall Java JRE from local browsers. Is it time in 2015 to just uninstall Flash now since we have HTML 5 with major websites like www.youtube.com already switching to it?

Slashdot Top Deals

Reference the NULL within NULL, it is the gateway to all wizardry.

Working...