The FileSystemWatcher class in the System.IO namespace can be used to monitor changes to the file system. It watches a file or a directory in your system for changes and triggers events when changes occur.
In order for the FileSystemWatcher to work, you should specify a directory that needs to be monitored. The FileSystemWatcher raises the following events when changes occur to a directory that it is monitoring.
Changed: This event is triggered when a file or a directory in the path being monitored is changed
Created: This event is triggered when a file or a directory in the path being monitored is created
Deleted: This event is triggered when a file or a directory in the path being monitored is deleted
Error: This event is triggered there is an error due to changes made in the path being monitored
Renamed: This event is triggered when a file or a directory in the path being monitored is renamed
Creating a simple file system watcher in C#
Let's create a new console application project in Visual Studio to demonstrate how a typical file system watcher works. Note that a better way to use the FileSystemWatcher class would be by using a Windows Service. You can build a Windows Service that uses the FileSystemWatcher class and sends out notifications as and when changes occur to the path being watched.
Next.js 2.0 also changes how builds work, resulting in smaller and more efficient apps, the developers said. Webpack common chunks have been set up to avoid shipping repeated code across components, and page loads have been made faster through the use of hashes so initial bundle files on clients are cached permanently. Other provisions were made to ensure an app works correctly.
From development to deployment, one the most distinctive traits of using containers is speed. The development cycle is not only rapid, but divided into multiple, bite-sized components that are constantly updated. At runtime, frequent updates and sometimes ephemeral workloads make it a challenge to lock down any environment. This scenario perfectly exemplifies why speed has always been the enemy of security, but in container-based development environments, there is a way to nip this problem in the bud: automation, automation, and more automation.
Unit testing helps to detect bugs and reduce time to market. It is the act of testing small components or units of code so as to find, reduce, or eliminate errors in your applications.
I recently explored JetBrains' DotMemory Unit framework, which extends the functionalities provided by the popular unit testing frameworks together with the functionalities of a memory profiler.
Why DotMemory Unit? Why is it helpful?
The DotMemory Unit framework enables you to write unit tests that can check your code to determine memory issues, i.e., memory leaks and memory traffic. It's a unit testing framework together with the features of a memory profiler: It can check for memory allocation of a particular type, check for memory traffic, and get memory snapshots for additional investigation on memory issues.
Greg Hovanesyan, who recently posted here an Introduction to the Web Audio API, follows up with another huge post on how to use it to create iconic music from our nerds past, like sounds from The Legend of Zelda and Metroid.
Data is the lifeblood of Experian, a global business that handles staggeringly large volumes of financial and consumer information. But when Barry Libenson arrived as CIO in June 2015, he found that the company didn’t distribute data between its divisions and to its customers as fast or as efficiently as it should. To address the situation, he launched several IT initiatives, such as implementing application programming interfaces (API), to improve data transfer, create other efficiencies and ultimately speed the pace of innovation. Here Libenson shares his thinking behind APIs and some of his other strategic decisions.
As we look deep into 2017, one of the questions on every web developer’s mind ought to be, “What trend will define the web in 2017?” Just three years ago, we were talking about the “Year of Responsive Web Design”, and we’ve all seen how the stakes were raised when Google announced Mobilegeddon (21 April 2015) and started to boost the rankings of mobile-friendly websites in mobile search results.
Today, as our findings indicate, responsive web design is the norm, with 7 out of 10 mobile-optimized websites being responsive, up from 5 last year, which begs the questions: What’s next? Where is it all heading? We solved the screen-size issue and had a great run for a few years — now what?
Hoping to spread development of artificial intelligence applications, neural network platform builder Neurala is offering a toolkit that uses C++ for building AI applications.
The Neurala Developers Program includes C++ APIs, testing tools, code samples, and a working program with source code to integrate the Neurala Brain deep learning platform into applications. While mostly working with Linux, Neurala also offers wrappers for Google Android and Apple iOS application development.
Developers don't already need to know about AI in order to use the program, said Roger Matus, Neurala vice president of products and markets. They could, for example, build applications like the vision part of self-driving automobile applications; Neurala's software then enables smart products to learn and adapt in real time.
A vulnerability in a JSON-based web encryption protocol could allow attackers to retrieve private keys. Cryptography experts have advised against developers using JSON Web Encryption (JWE) in their applications in the past, and this vulnerability illustrates those very dangers.
Software libraries implementing the JWE, or RFC 7516, specification suffer from a classic Invalid Curve Attack, wrote Antonio Sanso, a senior software engineer at Adobe Research Switzerland and part of the Adobe Experience Manager security team. The JSON Web Token (JWT) is a JSON-based open standard defined in the OAuth specification family used for creating access tokens, and JWE is a set of signing and encryption methods for JWT. Developers using JWE with Key Agreement with Elliptic Curve Diffie-Hellman Ephemeral Static (ECDH-ES) are affected.
Programmers have pride with good reason. No one else has the power to reach into a database and change reality. The more the world relies on computers to define how the world works, the more powerful coders become.
Alas, pride goeth before the fall. The power we share is very real, but it’s far from absolute and it’s often hollow. In fact, it may always be hollow because there is no perfect piece of code. Sometimes we cross our fingers and set limits because computers make mistakes. Computers too can be fallible, which we all know from too much firsthand experience.
Of course, many problems stem from assumptions we programmers make that simply aren’t correct. They’re usually sort of true some of the time, but that’s not the same as being true all of the time. As Mark Twain supposedly said, “It ain’t what you don’t know that gets you into trouble. It’s what you know for sure that just ain’t so.”
A huge high-five to John James Jacoby for his help here on CSS-Tricks fixing up our Markdown + bbPress integration. John runs Plugins Loaded, a source of high-quality WordPress plugins that you can use for free, or choose to pay to support.
Did you know that Puerto Rico is a U.S. territory? Surprisingly, in a recent poll, fewer than half of Americans knew that Puerto Rico is part of the U.S.
So as part of the U.S., service providers in Puerto Rico are technically onshorers, companies that provide outsourced services in their own country (although the term nearshore is becoming a universally-accepted term for outsourcing services closer to home).
Semantics aside, Puerto Rico is fast becoming the onshore provider of choice for software development services because it’s able to provide the same benefits (and more) that its U.S. counterparts offer, with many of the perks of offshoring.
Microsoft has delayed the release of its tools for connecting other services to the Cortana virtual assistant, a decision that could cause it to lose ground in a crowded industry.
The tech titan announced the Cortana Skills Kit in December of last year, saying at the time that it would be released to the public in February. As Microsoft watcher Brad Sams noted on Twitter, Microsoft missed that deadline, and the Skills Kit remains locked in a private beta with a select group of partners. Microsoft didn’t offer an explanation for the delay, saying in a statement that the kit will be coming soon.
You might need to know how much time a method in your application takes to execute. This information would help you analyze the slow running methods in the application.
There are various ways to achieve this -- you can use profilers or write custom code to get this information. Some of the popular performance profilers that you can use to profile your .Net applications are: RedGate ANTS Performance Profiler, JetBrains dotTrace, and Telerik Just Trace. You can also measure the execution time programmatically with a popular AOP library called PostSharp.
Measuring the execution time programmatically
If you would like to measure the execution time of a method, i.e., the time a method takes to execute programmatically, you can use the Stopwatch class in the System.Diagnostics namespace, which can measure the elapsed time for one interval or to measure the total elapsed time for multiple intervals. The following code snippet illustrates how you can leverage the Stopwatch class to measure execution time:
Creating our first Elm application might seem like a hard task. The new syntax and the new paradigm can be intimidating if you haven't used other functional programming languages before. But once you create your first application, you will understand why Elm has been gaining so much attention lately.
With GraphQL, FQL, and IndexedDB2, we have new tools at our fingertips that allow us to build products that are not only more flexible but also faster. With this week’s Web Development Reading List, we’ll dive a bit deeper into these promising technologies and combine this with thoughts about the openness of the internet, ethical choices, and building inclusive products. So without further ado, let’s get started!
Chrome 57 just hit stable, now the Chrome developer team announced Chrome 58 beta. It includes IndexedDB2.0 support and improvements to iframe navigation. Among the smaller changes are also auto-pause/resume of video on Android when the window is in the background and the fact that HTTPS is now required for the Web Notifications API.
The upgrade features view engine improvements making Angular smaller and faster and helping developers build smaller applications. "We've made changes under to hood to what AOT-generated (ahead of time) code looks like," Stephen Fluin, a Google developer advocate for Angular, said in a bulletin received by InfoWorld close to press time. "These changes should reduce the size of the generated code for your components by more than half in some cases."
According to Google metrics, generated code had been about 10 times the size of the original template. "With this release, generated code is now only 3 times the size of the original template," the bulletin said. Angular's builders had heard from developers that migrating to the new version, which had been available in a release candidate form, had reduced production bundles by hundreds of kilobytes.
CoreOS's Tectonic is setting course for new clouds.
Previously available on Amazon's cloud and on bare metal, CoreOS will now be offered for other environments, including Microsoft Azure and OpenStack. All this comes courtesy of a revamped installation system that makes it easier to orchestrate and automate Tectonic deployments -- and is soon to be offered as open source.
Already managed by Kubernetes, Tectonic also offers new improvements to showcase Google’s project as a mechanism for tasks besides container management.
Not every computer owner would be as pleased as Andrew Wheeler that their new machine could run “all weekend” without crashing.
But not everyone’s machine is “The Machine,” an attempt to redefine a relationship between memory and processor that has held since the earliest days of parallel computing.
Wheeler is a vice president and deputy labs director at Hewlett Packard Enterprise. He’s at the Cebit trade show in Hanover, Germany, to tell people about The Machine, a key part of which is on display in HPE’s booth.
Editor's Note: In the world of web design, we tend to become preoccupied with the here and now. In "Resilient Web Design", Jeremy Keith emphasizes the importance of learning from the past in order to better prepare ourselves for the future. So, perhaps we should stop and think more beyond our present moment? The following is an excerpt from Jeremy's web book.
Design adds clarity. Using colour, typography, hierarchy, contrast, and all the other tools at their disposal, designers can take an unordered jumble of information and turn it into something that’s easy to use and pleasurable to behold. Like life itself, design can win a small victory against the entropy of the universe, creating pockets of order from the raw materials of chaos.
The Book of Kells is a beautifully illustrated manuscript created over 1200 years ago. It’s tempting to call it a work of art, but it is a work of design. The purpose of the book is to communicate a message; the gospels of the Christian religion. Through the use of illustration and calligraphy, that message is conveyed in an inviting context, making it pleasing to behold.
On Hired, companies apply to you, not the other way around. Upon getting approved your profile becomes visible to over 6,000 innovative companies, hiring for technical roles. So if you’re looking for new opportunities, but don't want the hassle of applying to all those companies, try Hired and let the companies apply to you!
It's a weird time. So many of us are living so close to the edge. As Gina puts it, it's harder to find "a 5-year-old Stack Overflow answer that solves" your problem. New things drop …
The SaaS-based tool, which features capabilities like role-based access control, semantic versioning, and package discovery, now can be used on public code on the NPM registry, NPM Inc. said on Wednesday. Developers can transition between solo projects, public group projects, and commercial projects, and users with private registries can use Orgs to combine code from public and private packages into a single project.
"The only difference in functionality [between private and open source use] is that you can mark packages as private if you're a paid organization," NPM Inc. CEO Isaac Schlueter, said. For developers collaborating with a team of people on private packages, Orgs costs $7 per user.
Voice and natural language systems are an important step toward making our digital servants serve us on our terms. We went from punch cards to green screens to GUIs and eventually to touch-based, palm-sized, location- and context-sensitive computers in the form of smartphones (not to mention those annoying smart-car panels). Now we have Apple’s Siri, Amazon’s Alexa, Microsoft’s Cortana, and Google’s Assistant answer our needs.
GitLab, open source competitor to GitHub and Bitbucket, has rolled out version 9 of its enterprise edition, with new features for managing team members, gaining visibility into code deployments, and monitoring performance.
Many of the new additions highlight GitLab's focus on deployment and oversight, where chief competitor GitHub Enterprise highlights code hosting and collaboration.
Subgroups, a new user organization feature, allows members of exiting teams to be subdivided further into smaller units. GitHub's team-based user system is meant to work the same way, but GitLab has previously added more granular user-management features -- for example, automatic expiry of group membership for temporary workers.
Devops isn’t simply transforming how developers and operations work together to deliver better software faster, it is also changing how developers view application security. A recent survey from software automation and security company Sonatype found that devops teams are increasingly adopting security automation to create better and safer software.
It’s no secret that traditional development and operations teams view security controls as slow and cumbersome, and often look for ways to bypass the requirements in their rush to get software out the door. However, only 28 percent of respondents from organizations with mature devops practices felt that security requirements slowed down software development, Sonatype found in its 2017 DevSecOps Community Survey. In fact, 84 percent of respondents from mature devops organizations viewed application security as a safety measure, not an inhibitor to innovation.
The checkout page is the last page a user visits before finally decide to complete a purchase on your website. It’s where window shoppers turn into paying customers. If you want to leave a good impression, you should provide optimal usability of the billing form and improve it wherever it is possible to.
In less than one day, you can add some simple and useful features to your project to make your billing form user-friendly and easy to fill in. A demo with all the functions covered below is available. You can find its code in the GitHub repository.
Without a lot of effort on your part, there are several things you can do to increase your productivity. Apps have been created for a nearly unlimited number of different uses. Whatever an app is used for, it often makes a given task easier. No matter what your line of work, an app exists that […]
I started out as a web developer, and that's now one part of what I do as a full-stack developer, but never had I imagined I'd create things for the desktop. I love the web. I love how altruistic our community is, how it embraces open-source, testing and pushing the envelope.
I love discovering beautiful websites and powerful apps. When I was first tasked with creating a desktop app, I was apprehensive and intimidated. It seemed like it would be difficult, or at least… different.
jQuery 3.2.1 is now available! This release comes with some hotfixes for regressions that were introduced in the 3.2.0 build four days ago. We wanted to release this patch as quickly as possible to squash any bugs you may have experienced when upgrading. The most significant one had to do with retrieving width or height … Continue reading →
In 2017, the question is not whether we should use a responsive design framework. Increasingly, we are using them. The question is which framework should we be using, and why, and whether we should use the whole framework or just parts of it.
With dozens of responsive design frameworks available to download, many web developers appear to be unaware of any except for Bootstrap. Like most of web development, responsive design frameworks are not one-size-fits-all. Let's compare the latest versions of Bootstrap, Foundation and UIkit for their similarities and differences.
We’re all designers. Whether we do a layout, a product design or write code to design a product technically doesn’t matter here. What does matter though, is that we always take the context of a project into consideration. Because as someone shaping a project so that it is appealing to the clients and works in the best way possible for the target audience, we have a pretty big responsibility.
Imagine architects building a wall out of recycled material that also looks nice — sounds pretty great, right? But seen in the context that this will be a wall that divides people and encourages racism and even more inequality in our society, our first impression of the undertaking suddenly shifts into the opposite direction. We have to make new decisions every time we start a new project, and seeing things in context is crucial to live up to our responsibility — both in our work and our lives.
Obtaining international addresses from clients and customers just got a whole lot easier. Streetlayer offers a seamless address data processing add-on. The JSON API helps to analyze, validate, and format international addresses immediately upon entering the system. The primary benefit is that you get higher quality data sets. The full address is verified and with […]
Smashing Magazine is changing: a new design, a new layout, a new technical stack, a new printed magazine, a new Smashing Membership, and the same good ol’ obsession with quality content. Here’s a sneak preview of what’s coming up.
Today marks an important milestone in Smashing Magazine’s life, and this very page is an early preview of what’s coming up next: many experiments, new challenges, but still a good ol’ obsession with quality content. A complete overhaul, both visually and technically, a fine new printed magazine, and a shiny new Smashing Membership, with nifty features and goodies for you, our lovely community. Curious? Well, fasten your seatbelt and browse around — it’s going to be quite a journey!
jQuery 3.2.0 has been released! This release includes some bug fixes, improvements, and some deprecations. There should be no compatibility issues if upgrading from jQuery 3.0+. If you haven’t yet upgraded to jQuery 3+, please have a look at the 3.0 Upgrade Guide. The jQuery Migrate 3.0 plugin will help you to identify compatibility issues … Continue reading →
Sometimes we tend to think of our designs as if they are pieces of art. But if we think of them this way, it means they won’t be ready to face the uncertain conditions of the “real world.” However, there is also beauty in designing an interface that is ready for changes — and, let’s admit it, interfaces do change, all the time.
One of the things I like most about designing a mobile app is that, from the initial concepts to the time when you are fine-tuning and polishing all of the interface details, this is a process with many steps.
Pull-to-refresh is one of the most popular gestures in mobile applications right now. It’s easy to use, natural and so intuitive that it is hard to imagine refreshing a page without it. In 2010, Loren Brichter created Tweetie, one of numerous Twitter applications. Diving into the pool of similar applications, you won’t see much difference among them; but Loren’s Tweetie stood out then.
It was one simple animation that changed the game — pull-to-refresh, an absolute innovation for the time. No wonder Twitter didn’t hesitate to buy Tweetie and hire Loren Brichter. Wise choice! As time went on, more and more developers integrated this gesture into their applications, and finally, Apple itself brought pull-to-refresh to its system application Mail, to the joy of people who value usability.
MongoDB 3.4 continues the trend of databases building out support for a range of conceptual data models over the same underlying data store. This multimodel approach aims to deliver a single database that can be used to store data as documents, tables, and graphs simultaneously. The benefit to the user is a dramatically simplified infrastructure when compared to a polyglot persistence model, which might entail managing three or four separate data stores to satisfy those different use cases.
Over the last five years, Node.js has helped to bring uniformity to software development. You can do anything in Node.js, whether it be front-end development, server-side scripting, cross-platform desktop applications, cross-platform mobile applications, Internet of Things, you name it. Writing command line tools has also become easier than ever before because of Node.js — not just any command line tools, but tools that are interactive, useful and less time-consuming to develop.
If you are a front-end developer, then you must have heard of or worked on Gulp, Angular CLI, Cordova, Yeoman and others. Have you ever wondered how they work?
Given a choice, web designers prefer to focus on the aesthetics of web design. What they produce doesn’t always have to look all that gorgeous however. What’s more important is that it’s user-friendly, cross-browser compatible, fast loading, and semantic. Incorporating these nuts-and-bolts features into a website can be tedious, and not always a lot of […]
Editor's Note: Making big changes doesn't necessarily require big efforts — it's just a matter of moving in the right direction. We can't wait for Paul's new book on User Experience Revolution (free worldwide shipping starting from April 18!), and in this article, Paul shares just some of the little tricks and techniques to bring around a big UX revolution into your company — with a series of small, effective steps.
It feels like everywhere I turn somebody is saying that user experience is the next frontier in business, that we have moved beyond the age of features to creating outstanding experiences.
But for many of us who work on in-house teams, the reality feels a million miles away from this. Getting management to understand the importance of user experience seems so tough. Even colleagues don't seem to see the benefit. For those of us in-house, how are we going to get to this golden age of user experience design that people keep promising us?
Everyday, startups and enterprises alike find themselves asking the question: Should we build a mobile app? In 2017, for most, the answer is certainly “Yes we should, but… (insert seemingly insurmountable challenge associated with mobile development here).” The most common challenges include: 1. It’s too expensive 2. It requires expert level coding skills 3. The […]
In part 1 of this article, we looked at where in the world the new entrants to the World Wide Web are, and some of the new technologies the standards community has worked on to address some of the challenges that the next 4 billion people are facing when accessing the web. In short, we've tried to make some supply-side improvements to web standards so that websites can be made to better serve the whole world, not just the wealthy West.
But there are other challenges to surmount, such as ways to get over creaky infrastructure in developing markets (which can be done with stopgap technological solutions, such as proxy browsers), and we'll also look at some of the reasons why some of the offline billions remain offline, and what can be done to address this.
This week was a big week in terms of web development news. We got much broader support for CSS Grids and Web Assembly, for example, but I also stumbled across some great resources that teach us a lot of valuable things.
With this Web Development Reading List, we’ll dive deep into security and privacy issues, take a look at a lightweight virtual DOM alternative, and get insights into how we can overcome our biases (or at least how we can better deal with them). So without further ado, let’s dive right in!
What would life be without surprises? Pretty plain, wouldn’t you agree? Today, we are happy to announce a freebie that bubbles over with its friendly optimistic spirit, bound to sprinkle some unexpected sparks of delight into your projects: Ballicons 3. If that name rings a bell, well, it’s the third iteration of the previous Ballicons icon set created by the folks at Pixel Buddha.
This icon set covers a vibrant potpourri of subjects, 30 icons ranging from nature, travel and leisure motifs to tech and office. All icons are available in five formats (AI, EPS, PSD, SVG, and PNG) so you can resize and customize them until they match your project’s visual style perfectly. No matter if you like it bright and bubbly or rather sleek and simple — the set has the makings to become a real allrounder in your digital tool belt.
The past year has seen quite a rise in UI design tools. While existing applications, such as Affinity Designer, Gravit and Sketch, have improved drastically, some new players have entered the field, such as Adobe XD (short for Adobe Experience Design) and Figma.
For me, the latter is the most remarkable. Due to its similarity to Sketch, Figma was easy for me to grasp right from the start, but it also has some unique features to differentiate it from its competitor, such as easy file-sharing, vector networks, “constraints” (for responsive design) and real-time collaboration.
In a world driven by the Internet, mobile apps need to share and receive information from their products' back end (for example, from databases) as well as from third-party sources such as Facebook and Twitter.
These interactions are often made through RESTful APIs. When the number of requests increases, the way these requests are made becomes very critical to development, because the manner in which you fetch data can really affect the user experience of an app.
NoSQL database specialist MongoDB unveiled a new free tier for its MongoDB Atlas database-as-a-service (DaaS) offering on Tuesday. The company also released a utility to support live migration of data to MongoDB Atlas, whether that data is on-premise or in the cloud.
“Since we first introduced MongoDB to the community in 2009, we have been laser-focused on one thing—building a technology that gets out of the way of developers and makes them more productive,” Eliot Horowitz, CTO and co-founder of MongoDB, said in a statement Tuesday. “Now, with these updates to MongoDB Atlas, we’re tearing down more of the barriers that stand between developers and their giant ideas.”
What exactly are the benefits of a content hub strategy? Well, first of all, when done correctly, a content hub will capture a significant volume of traffic. And that's what most online businesses want, right?
We have recently introduced several clients to the concept of a content hub and would like to share our experience in this article. The clients are high-quality portals filled with targeted, valuable and often evergreen articles that users can return to time and again.
There are so many website builders on the market, that separating the good ones from the not quite so good ones can be a challenge. Finding the best of the bunch is an even bigger challenge. Affordability and ease of use are important. Even more important is finding a tool or platform that promotes customizability, […]
“There are more things in heaven and earth, Horatio, than are dreamt of in your philosophy,” said Shakespeare’s Hamlet, in the famous scene in which Hamlet teaches Horatio to be a web designer.
Horatio, as every schoolchild knows, is a designer from Berlin (or sometimes London or Silicon Valley) who has a top-of-the-line MacBook, the latest iPhone and an unlimited data plan over the fastest, most reliable network. But, as Hamlet points out to him, this is not the experience of most of the world’s web visitors.
If you’re still using a .com domain name and your old Gmail address, you’re missing an opportunity to ensure that your personal branding is as unique, memorable and professional as your work. Adopting .design gives you a creative edge, attracting attention from potential customers and employers. First impressions have never been so powerful! Who’s using […]
It's almost time to leave winter behind us here in the Northern Hemisphere. Most of the time, the weather can't quite make up its mind, and so the days pass by with half of the sky sunny while the other half gray. Nature usually tends to have a strong impact on my mood, and so these days I feel like I'm literally in a gray zone — between winter and spring.
I'm not sure about you, but with springtime lurking around the corner, my need for extra inspiration is even bigger. So, I hope that this month's set will give you just that spark you need to cheer you up and boost your creativity.
Singer is an open-source standard for writing scripts that move data. It describes how data extraction scripts—called “Taps” —and data loading scripts—called “Targets”— should communicate, allowing them to be used in any combination to move data from any source to any destination. Send data between databases, web APIs, files, queues, and just about anything else […]
Every image, in every webpage you work on, should be flawless in terms of its quality, and its ability to fit with the concept or idea behind the page. An image should also fit in contextually with the accompanying text. These considerations, and how cleverly you apply them, can make or break user perception of […]
WordPress has many pluses, but it’s not necessarily the most glamorous platform to work with. Still customize it with themes and plugins to fit a designer’s needs has made it the most popular CMS. Plugins are great to have access to when you need to embed certain functions into your websites. There are a great […]