Feed aggregator

CodeSOD: Strung Out Properties

The Daily WTF -

Microsoft recently announced that they’re changing how they handle .NET languages. Up to this point, the focus has been on keeping them all feature compatible, but going forward, they’ll be tuning VB.Net towards beginners, C# towards professionals, and F# towards people who have to use .NET but want to “be functional”.

VB.Net’s biggest flaw is that it’s inherited all of the Visual Basic programmers. You may be able to write bad code in any language, but I’m not convinced you can write good code in VB6 or earlier. Those bad habits, like Hungarian notation, can mark out “modern” code written with a distinctly “non-modern” mindset.

Like this:

Private moConnection As New OleDb.OleDbConnection Public Property DBConnection(Optional ByVal strConn As String = "") As String Get Return strConn End Get Set(ByVal value As String) value = strConn If Not (moConnection Is Nothing) OrElse moConnection.State <> ConnectionState.Closed Then moConnection.Close() End If moConnection = New OleDb.OleDbConnection(strConn) moConnection.Open() End Set End Property

What you see here is a “collection property”, in VB. The property DBConnection is meant to be indexed, though that index is optional. A sane usage of this construct would let you do something like: connections.DBConnection("production") = "DataSource=…". That’s not what’s going on here.

Here, the optional index is the actual connection string of the database we want to connect to. The setter, not having anything to do with the value being passed in, ignores it. There’s no exception handling, it’s generally bad form for setters to have side effects, and this doesn’t even manage the connection, but the connection string.

If you wanted to invoke this, you would need to do something like this: connections.DBConnection("DataSource=…") = "this string doesn't matter but needs to be here because that is exactly how this works". Worse, if you tried to invoke it the obvious way- connections.DBConnection = "DataSource=…", you’d pass an empty string to the database connection. And finally, when you get the property, you have to pass the value you want to get in! currConn = connections.DBConnection("DataSource=…").

hljs.initHighlightingOnLoad(); [Advertisement] Otter enables DevOps best practices by providing a visual, dynamic, and intuitive UI that shows, at-a-glance, the configuration state of all your servers. Find out more and download today!

Janez Urevc: Possible solution for knowledge sharing in the Drupal 8 media domain

Drupal Planet -

Possible solution for knowledge sharing in the Drupal 8 media domain slashrsm Mon, 06.02.2017 - 10:48

Drupal 8 has very good media handling support. Media team has (and still is) working hard to make Drupal the best CMS in the world when it comes to managing media. We have many modules in the contrib space that solve most of the common use cases in the domain. There is one problem though; there are many of them and some of them are quite complex and abstract. I've noticed that many times users struggle to completely understand what each module is responsible for, which features it comes with and specially how they all together fit into the bigger picture.

There are so-called feature modules (such as File entity browser, Media, Content browser, Media entity browser, ...) and distributions (such as NP8, Thunder, Lightning, ...) which ship with default configuration for the 80% use case. They are plug and play solutions, but it is also possible to use them as a base for learning and research of the ecosystem.

But unfortunately that's not enough. While some people learn the quickest by exploring existing solutions (myself included) that isn't the case for everyone. A lot of people need more guidance and those are the users that we're currently not supporting as much as we should. In order to drive further adoption of the media ecosystem and Drupal 8 itself we need to solve this knowledge sharing problem that I believe we have.

I was thinking about this problem a lot lately and I think I came up with an idea that could help us solve it.

It is a book.

A problem solving oriented book which would guide users through the ecosystem, explain individual parts and, most importantly, offer a bunch of recipes for the common problems. It wouldn't be one of those 800+ pages technical books (who has time to read that?!). Rather it would be a compact source of information which you can have on your desk and use it when you run into a problem. We all want to build websites and the purpose of this book would be to help you do that as fast and as efficiently as possible.

Book would produced by the people that designed and built the Drupal 8 media ecosystem, which would ensure highest levels of quality. It would be released under a Creative commons license with its sources publicly available on GitHub. Printed and compiled eBook versions would be sold through the standard channels.

Why copyleft?

I honestly believe into the free sharing of knowledge in our society. My opinion is that the only way to evolve our civilization is to freely share the knowledge that we have. There are also practical reasons besides the philosophical one. Making the book publicly available ensures that it will be likely updated as the ecosystem and Drupal itself evolve and change. This wouldn't necessarily be the case if the standard copyright license would be used.

Great idea! Why didn't you realize it already?

I am glad that you agree! :) Well... it is not that easy. Producing a real book is not that simple and it also comes with quite some expenses. There is the cost of the content production, proofreading, design, print, shipping, ... I've done a back of a napkin calculation and estimated that we'd need around 20.000€/$21.500/17.000GBP to do it.

My idea was to start a crowdfunding campaign to raise this amount. Backers would, depending on the perk level, get an eBook, print edition or both. Besides that they'd also get early access to the repository with the ability to provide feedback during the process of writing.

Now I need your feedback

I need to hear from you. Is this something that would benefit the community? Is there any better way to educate users about the ecosystem? Would you prefer an online video course instead of a book? In-person training? Something else? Would you be prepared to back the crowdfunding campaign? If yes, what amount would you be prepared to invest?

Please use the form below to share your thoughts. Thank you! I appreciate it.

Enjoyed this post? There is more! Join us at the next Drupal Media sprint at the Mountain camp in Davos! Playing with the Sculpin static site generator Results of the Drupal 8 media sprint

The Brief, Bumbling Tech Careers of Lady Gaga, Alicia Keys, and Will.i.am

Slashdot -

"Four years ago this week, Blackberry named Alicia Keys its global creative officer... Keys was really going to work for Blackberry -- to participate in weekly calls addressing product development; develop ideas and content for the Keep Moving Projects, which targeted artists and athletes; and of course, promote the brand during her upcoming tour... It didn't work." Slashdot reader mirandakatz writes: For a minute in history, it was oh-so-cool for legacy tech companies to hire pop stars... In 2005, HP brought Gwen Stefani on as a creative director. In 2010, Lady Gaga landed the job of creative director at Polaroid. In 2011, Will.i.am was the director of creative innovation at Intel. In 2012, Microsoft brought on Jessica Alba as creative director to promote its Windows Phone 8. These roles were all touted as far more involved than the mere celebrity pitchman: The artists promised, to varying degrees, to dive into the business. But in all of these cases, the strategy failed. At Backchannel, Jessi Hempel dives into why that is, and how big names in entertainment are now finding other ways to harness the momentum of tech. Lady Gaga left Polaroid in less than a year after "collaborating" on video camera sunglasses that offered playback through LCD lenses. While they weren't popular, this article argues most of these tech companies "faced structural business issues too significant to be addressed through celebrity branding and artistic energy." One digital ad agency even tells the site that "It's always been a flawed strategy," and calls the hiring of a celebrity "a press cycle hack."

Read more of this story at Slashdot.

Ask Slashdot: Why Do You Care About Tech Conferences?

Slashdot -

An anonymous user is "just starting a programming career," and has several questions for Slashdot's readers: What exactly is the role of tech conferences? I always assumed they were mostly for exhibitors to pitch me things, but then what's in it for me? Am I just going there to network, or am I learning new cutting-edge techniques and getting enlightened by awesome training sessions? Or is it just a fun way to get a free trip to Las Vegas? And then what's in it for my employer, who's paying to send me there? If my boss has to approve the cost of attending a conference, what's going to make him say yes? I mean, do employers really get enough value from that extra conference-only information to justify sending off their employees for several days of non-productivity? (Don't they know all that networking could lead me to job offers from other companies?) It's always been a little intimidating the way people talk about conferences, like everyone already knows all about them, and drop the conference's name into the conversations like you should already know what it is. I always assumed people just attended only conferences for their current programming language or platform -- but is there more to it than that? What exactly is the big deal? I'm struggling to even find the right metaphor for this -- is it a live interactive infomercial or a grand gathering of geeky good will? So leave your best answers in the comments. Why do you care about tech conferences?

Read more of this story at Slashdot.

Kernel prepatch 4.10-rc7

LWN Headlines -

The 4.10-rc7 kernel prepatch has been released for testing. "Hey, look at that - it's all been very quiet, and unless anything bad happens, we're all back to the regular schedule with this being the last rc."

Studies Link Some Stomach Drugs To Alzheimer's Disease and Kidney Problems

Slashdot -

While the recommended dosage for Nexium, Prevacid and Prilose is just two weeks, doctors often advise patients to continue taking them for years. But now Scientific American reports that "Chronic use of popular heartburn medicines may be riskier than was thought," citing two papers linking the drugs to an increase risk of dementia, including Alzheimer's disease, and a greater risk of kidney problems. schwit1 quotes their report: The papers did not prove that PPIs cause the problems. But some researchers have nonetheless suggested possible mechanisms by which long-term use of the drugs could trigger dementia or kidney problems. A reduction in vitamin B12, for example, might leave the brain more vulnerable to damage, says Britta Haenisch, an author of the JAMA Neurology study and a neuropharmacologist at the Bonn campus of the German Center for Neurodegenerative Diseases. Last spring clinicians at the Houston Methodist Research Institute reported another plausible explanation for how PPIs might lead to these unexpected health issues: they picked up signs that the drugs act not only in the stomach but elsewhere in the body, too. The article ends on an ambiguous note. "Without conclusive data, physicians and patients have to balance the need to prevent the ill effects of excess stomach acid and reflux with the desire to avoid potentially serious -- if theoretical -- side effects from long-term use of PPIs."

Read more of this story at Slashdot.

A Super Bowl Koan: Does The NFL Wish It Were A Tech Company?

Slashdot -

Are tech companies cashing in on the popularity of Super Bowl -- or is the Super Bowl trying to get into the world of tech? An anonymous reader writes: The NFL hosted a startup pitch competition before the game. And they also ran tech-themed "future of football" ads during the game which showcased the robot tackling dummies that provide moving targets for training players. Lady Gaga's halftime show is even expected to feature hundreds of drones. But Microsoft was also hovering around outside the stadium, pushing the concept of "social autographs" (digital signatures drawn onto images) with their Surface tablets. Intel ran ads during the game touting their 360-degree replay technology. Besides the usual game-day ads for beer, there were also several for videogames -- Arnold Schwarzenegger endorsed Mobile Strike, and a reality TV show parody suddenly turned into an ad for World of Tanks. So is technology subtly changing the culture of the Super Bowl -- or is the Super Bowl turning into a massive pageant of technology? Are any Slashdot readers even watching the Super Bowl? All I know is the Bay Area Newsgroup reported that a Silicon Valley engineer ultimately earns more over their lifetime than the average NFL football player.

Read more of this story at Slashdot.

How Open Sourcing Made Apache Kafka A Dominant Streaming Platform

Slashdot -

Open sourced in 2010, the Apache Kafka distributed streaming platform is now used at more than a third of Fortune 500 companies (as well as seven of the world's top 10 banks). An anonymous reader writes: Co-creator Neha Narkhede says "We saw the need for a distributed architecture with microservices that we could scale quickly and robustly. The legacy systems couldn't help us anymore." In a new interview with TechRepublic, Narkhede explains that while working at LinkedIn, "We had the vision of building the entire company's business logic as stream processors that express transformations on streams of data... [T]hough Kafka started off as a very scalable messaging system, it grew to complete our vision of being a distributed streaming platform." Narkhede became the CTO and co-founder of Confluent, which supports enterprise installations of Kafka, and now says that being open source "helps you build a pipeline for your product and reduce the cost of sales... [T]he developer is the new decision maker. If the product experience is tailored to ensure that the developers are successful and the technology plays a critical role in your business, you have the foundational pieces of building a growing and profitable business around an open-source technology... Kafka is used as the source-of-truth pipeline carrying critical data that businesses rely on for real-time decision-making."

Read more of this story at Slashdot.

Disney Thinks High Schools Should Let Kids Take Coding In Place of Foreign Languages

Slashdot -

theodp writes: Florida lawmakers are again proposing a contentious plan that would put coding and foreign language on equal footing in a public high school student's education. Under a proposed bill students who take two credits of computer coding and earn a related industry certification could then count that coursework toward two foreign language credits. "I sort of comically applaud that some would want to categorize coding as a foreign language," said Miami-Dade Schools Superintendent Alberto Carvalho. "Coding cannot be seen as an equivalent substitute." Disclosure records show that Walt Disney Parks and Resorts has three lobbyists registered to fight in support of the bill. Disney did not return an email seeking comment, but State Senator Jeff Brandes said the company's interest is in a future workforce... Disney has provided signature tutorials for the nation's Hour of Code over the past three years, including Disney's Frozen princess-themed tutorial.

Read more of this story at Slashdot.

14,000 Domains Dropped Dyn's DNS Service After Mirai Attack

Slashdot -

chicksdaddy New data suggests that some 14,500 web domains stopped using Dyn's Managed DNS service in the immediate aftermath of an October DDoS attack by the Mirai botnet. That's around 8% of the web domains using Dyn Managed DNS... "The data show that Dyn lost a pretty big chunk of their customer base because they were affected by (Mirai)," said Dan Dahlberg, a research scientist at BitSight Technologies in Cambridge, Massachusetts... BitSight, which provides security rating services for companies, analyzed a set of 178,000 domains that were hosted on Dyn's managed DNS infrastructure before and immediately after the October 21st attacks. It's possible some of those domains later returned to Dyn -- and the number of actual customers may be smaller than the number of hosted domains. But in the end it may not have mattered much, since Dyn was acquired by Oracle the next month, and TechCrunch speculates that the deal had already been set in motion before the attack. They also add that "Oracle, of course, is no stranger to breaches itself: in August it was found that hundreds of its own computer systems were breached."

Read more of this story at Slashdot.

Are Gates, Musk Being 'Too Aggressive' With AI Concerns?

Slashdot -

gthuang88 reports on a talk titled "Will Robots Eat Your Job?" Bill Gates and Elon Musk are sounding the alarm "too aggressively" over artificial intelligence's potential negative consequences for society, says MIT professor Erik Brynjolfsson. The co-author of The Second Machine Age argues it will take at least 30 to 50 years for robots and software to eliminate the need for human laborers. In the meantime, he says, we should be investing in education so that people are prepared for the jobs of the future, and are focused on where they still have an advantage over machines -- creativity, empathy, leadership, and teamwork. The professor acknowledges "there are some legitimate concerns" about robots taking jobs away from humans, but "I don't think it's a problem we have to face today... It can be counterproductive to overestimate what machines can do right now." Eventually humankind will reach a world where robots do practically everything, the professor believes, but with a universal basic income this could simply leave us humans with more leisure time.

Read more of this story at Slashdot.

Anonymous Takes Down 10,613 Dark Web Portals

Slashdot -

An anonymous reader writes: Anonymous hackers have breached Freedom Hosting II, a popular Dark Web hosting provider, and have taken down 10,613 .onion sites. In a message left on all Freedom Hosting II sites, the hackers claim to have found massive troves of child pornography imagery hosted on the company's servers. The hackers dumped 74GB of server files (half of which they say contained child pornography) and a database dump of 2.3GB. Security researcher Chris Monteiro has analyzed some of the dumped data. He says he discovered .onion URLs hosting botnets, fraud sites, sites peddling hacked data, weird fetish portals, more weird stuff, and child abuse websites targeting both English- and Russian-speaking buyers. Freedom Hosting II hosts about a fifth of all .onion URLs. The first Freedom Hosting service was targeted by Anonymous in 2011 and eventually shut down in 2013 after the FBI also found child pornography hosted on its sites.

Read more of this story at Slashdot.

Can The Mayhem AI Automate Bug-Patching?

Slashdot -

"Now when a machine is compromised it takes days or weeks for someone to notice and then days or weeks -- or never -- until a patch is put out," says Carnegie Mellon professor David Brumley. "Imagine a world where the first time a hacker exploits a vulnerability he can only exploit one machine and then it's patched." An anonymous reader quotes MIT Technology Review: Last summer the Pentagon staged a contest in Las Vegas in which high-powered computers spent 12 hours trying to hack one another in pursuit of a $2 million purse. Now Mayhem, the software that won, is beginning to put its hacking skills to work in the real world... Teams entered software that had to patch and protect a collection of server software, while also identifying and exploiting vulnerabilities in the programs under the stewardship of its competitors... ForAllSecure, cofounded by Carnegie Mellon professor David Brumley and two of his PhD students, has started adapting Mayhem to be able to automatically find and patch flaws in certain kinds of commercial software, including that of Internet devices such as routers. Tests are underway with undisclosed partners, including an Internet device manufacturer, to see if Mayhem can help companies identify and fix vulnerabilities in their products more quickly and comprehensively. The focus is on addressing the challenge of companies needing to devote considerable resources to supporting years of past products with security updates... Last year, Brumley published results from feeding almost 2,000 router firmware images through some of the techniques that powered Mayhem. Over 40%, representing 89 different products, had at least one vulnerability. The software found 14 previously undiscovered vulnerabilities affecting 69 different software builds. ForAllSecure is also working with the Department of Defense on ideas for how to put Mayhem to real world use finding and fixing vulnerabilities.

Read more of this story at Slashdot.

Mozilla To Drop Support For All NPAPI Plugins In Firefox 52 Except Flash

Slashdot -

The Netscape Plugins API is "an ancient plugins infrastructure inherited from the old Netscape browser on which Mozilla built Firefox," according to Bleeping Computer. But now an anonymous reader writes: Starting March 7, when Mozilla is scheduled to release Firefox 52, all plugins built on the old NPAPI technology will stop working in Firefox, except for Flash, which Mozilla plans to support for a few more versions. This means technologies such as Java, Silverlight, and various audio and video codecs won't work on Firefox. These plugins once helped the web move forward, but as time advanced, the Internet's standards groups developed standalone Web APIs and alternative technologies to support most of these features without the need of special plugins. The old NPAPI plugins will continue to work in the Firefox ESR (Extended Support Release) 52, but will eventually be deprecated in ESR 53. A series of hacks are available that will allow Firefox users to continue using old NPAPI plugins past Firefox 52, by switching the update channel from Firefox Stable to Firefox ESR.

Read more of this story at Slashdot.

fluffy.pro. Drupal Developer's blog: Ctools: custom access plugin

Drupal Planet -

Last time we've learned how to create custom ctools content type plugin. In that post we've already created a module example_module where we defined the plugin. This time we will learn how to create custom ctools access plugin. This type of ctools plugins can be used as a selection rule for a panel variant or as a visibility rule for a panel pane. Please, read previous post before continue reading this. There is described how to create a module and integrate it with ctools.
Read more »

Which US Cities Have The Worst Malware Infection Rates?

Slashdot -

A new report from Enigma Software Group identifies the American cities with abnormally high infection rates for malware. An anonymous reader quotes TechRepublic: In 2016, Tampa, Orlando, and St. Louis each had malware infection rates per capita more than five times the national average -- the highest in the U.S., the report found. Those same three cities were also at the top of the list of highest infection rates in 2015... ESG compiled malware detection data from its SpyHunter anti-spyware software in the 100 largest cities in the US in all of 2016. Two Ohio cities also made it into the top ten for malware infection rates -- Cleveland and Cincinnati -- as well as Washington D.C. (with an infection rate 242% higher than the national average). But the infection rates drop noticeably after the top 10, with Miami (at #14) the last city with an infection rate more than double the national average. Interestingly, the top 35 cities include major high-tech centers like Seattle, Austin, Boston, and San Jose.

Read more of this story at Slashdot.

Report Finds PFAS Chemicals In One-Third of Fast Food Packaging

Slashdot -

dryriver quotes CNN: Most of the time, when you order fast food, you know exactly what you're getting: an inexpensive meal that tastes great but is probably loaded with fat, cholesterol and sodium. But it turns out that the packaging your food comes in could also have a negative impact on your health, according to a report published Wednesday in the journal Environmental Science & Technology Letters. The report found fluorinated chemicals in one-third of the fast food packaging researchers tested. These chemicals are favored for their grease-repellent properties. Along with their use in the fast food industry, fluorinated chemicals -- sometimes called PFASs -- are used "to give water-repellant, stain-resistant, and non-stick properties to consumer products such as furniture, carpets, outdoor gear, clothing, cosmetics (and) cookware," according to a news release that accompanied the report. "The most studied of these substances (PFOSs and PFOAs) has been linked to kidney and testicular cancer, elevated cholesterol, decreased fertility, thyroid problems and changes in hormone functioning, as well as adverse developmental effects and decreased immune response in children." The chemicals can migrate into your food, says one of the study's authors, who suggests removing it from the packaging as quickly as possible. (You might also request your french fries in a paper cup, which are free from "chemicals of concern".) But they also suggest pressuring fast food chains to remove the chemicals from their packaging, and the president of the Foodservice Packaging Institute acknowledges that after the study concluded in 2015, fluorochemical-free packaging was introduced.

Read more of this story at Slashdot.

Google, Unlike Microsoft, Must Turn Over Foreign Emails, Rules Judge

Slashdot -

Every year Google receives more than 25,000 requests from U.S. authorities for "disclosures of user data in criminal matters," according to a U.S. judge's recent ruling. But this one is different. An anonymous reader quotes Reuters: A U.S. judge has ordered Google to comply with search warrants seeking customer emails stored outside the U.S., diverging from a federal appeals court that reached the opposite conclusion in a similar case involving Microsoft. U.S. Magistrate Judge Thomas Rueter in Philadelphia ruled on Friday that transferring emails from a foreign server so FBI agents could review them locally as part of a domestic fraud probe did not qualify as a seizure...because there was "no meaningful interference" with the account holder's "possessory interest" in the data sought. "Though the retrieval of the electronic data by Google from its multiple data centers abroad has the potential for an invasion of privacy, the actual infringement of privacy occurs at the time of disclosure in the United States," Rueter wrote... The ruling came less than seven months after the 2nd U.S. Circuit Court of Appeals in New York said Microsoft could not be forced to turn over emails stored on a server in Dublin, Ireland that U.S. investigators sought in a narcotics case. Google announced they'd appeal the case, saying "We will continue to push back on overbroad warrants."

Read more of this story at Slashdot.

Reporter Pans Open Source Laptop Kit TERES-I

Slashdot -

The Verge's Paul Miller has some harsh words for the $242 open source DIY laptop kit TERES-I from Olimex. Instead of buying one hyper-integrated board that has all of the laptop's brains and I/O on it, you buy several little boards and wire them together. Then you put them inside a mostly finished case built by Olimex -- although if you want to go ultra DIY you can 3D print your own case, too. Everything, from the shell's CAD design to the motherboard's wiring, is available on GitHub for perusal or modification, and the modular nature of the internals means you can add a more powerful chipset or modify just about anything you find unsatisfying about the computer if you have the know-how or if Olimex or others offer compatible parts. But, unfortunately, almost everything about this laptop is unsatisfying right now. It runs a quad-core ARM64 chip, though x86 and MIPS chips might be offered later on. It has a tiny 11.6-inch screen, a huge bezel, a tiny trackpad, a cramped-looking keyboard, and a whole lot of plastic. The OS (Linux, naturally) runs off a microSD card. At least the LCD comes in a 1080p variant, because the default 1366 x 768 resolution is a real throwback. There's even 802.11n Wi-Fi, which has me questioning what decade it is. But are there any better alternatives? In the comments share your own thoughts about open source laptop kits.

Read more of this story at Slashdot.

Pages

Subscribe to Heydon Consulting aggregator